@@ -97,7 +97,7 @@ writeDocx :: Maybe FilePath -- ^ Path specified by --reference-docx
9797 -> WriterOptions -- ^ Writer options
9898 -> Pandoc -- ^ Document to convert
9999 -> IO B.ByteString
100−writeDocx mbRefDocx opts doc@(Pandoc (Meta tit auths _) _) = do
100+writeDocx mbRefDocx opts doc@(Pandoc (Meta tit auths date) _) = do
101101 let datadir = writerUserDataDir opts
102102 refArchive <- liftM toArchive $
103103 case mbRefDocx of
@@ -161,7 +161,8 @@ writeDocx mbRefDocx opts doc@(Pandoc (Meta tit auths _) _) = do
161161 ,("xmlns:dcmitype","http://purl.org/dc/dcmitype/")
162162 ,("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance")]
163163 $ mknode "dc:title" [] (stringify tit)
164− : mknode "dcterms:created" [("xsi:type","dcterms:W3CDTF")] () -- put doc date here
164+ : mknode "dcterms:created" [("xsi:type","dcterms:W3CDTF")]
165+ (maybe "" id $ normalizeDate $ stringify date)
165166 : mknode "dcterms:modified" [("xsi:type","dcterms:W3CDTF")] () -- put current time here
166167 : map (mknode "dc:creator" [] . stringify) auths
167168 let docPropsEntry = toEntry docPropsPath epochtime $ fromString $ showTopElement' docProps
@@ -653,4 +654,4 @@ inlineToOpenXML opts (Image alt (src, tit)) = do
653654 else do
654655 liftIO $ UTF8.hPutStrLn stderr $
655656 "Could not find image `" ++ src ++ "', skipping..."
656− inlinesToOpenXML opts alt
657+ inlinesToOpenXML opts alt