---------- Builtin macros: date and time

-- Convert current datetime to a string representation,
-- using 'formatTime'.
fmtDate :: HandleTeXIO m => String -> LexerT m [Token]
fmtDate fmt =
  let dateFormat = formatTime defaultTimeLocale fmt
  in (mkString . maybe "" dateFormat) <$> handleReadDate
fmtDate :: HandleTeXIO m => String -> LexerT m [Token]
fmtDate fmt =
  let dateFormat = formatTime defaultTimeLocale fmt
  in (mkString . maybe "" dateFormat) <$> handleReadDate
fmtDate fmt =
  let dateFormat = formatTime defaultTimeLocale fmt
  in (mkString . maybe "" dateFormat) <$> handleReadDate