1

using 'datetime' package, one can produce a custom date with custom date format like this:

\usepackage{datetime}

\newdateformat{nwfmt}{\the\day, \THEDAY \monthday, \THEYEAR} \newdate{mydate}{21}{12}{2020}

\begin{document} \nwfmt \mydate

\end{document}

but this does not give what i want. I want something like this: "monday, 21 december, 2020", i.e. full name of day and month and no uppercase.

1 Answers1

2

The \DayName from scrdate could be easily converted to lowercase, but the \monthname had to be explicitly defined (anglicizing Werner's answer). That's the best solution I could get for a complete lower-case date, looking like:

Lower-case date

\documentclass[border=2pt]{standalone}

\usepackage{datetime, scrdate}

\newdateformat{nwfmt}{\MakeLowercase{\DayName{\THEYEAR}{\THEMONTH}{\THEDAY}}, \THEDAY\ \monthname[\THEMONTH], \THEYEAR}

\makeatletter \renewcommand{\monthname}[1][\month]{% @orgargctr=#1\relax \ifcase@orgargctr \PackageError{datetime}{Invalid Month number \the@orgargctr}{% Month numbers should go from 1 to 12}% \or january% \or february% \or march% \or april% \or may% \or june% \or july% \or august% \or september% \or october% \or november% \or december% \else \PackageError{datetime}{Invalid Month number \the@orgargctr}{% Month numbers should go from 1 to 12}% \fi} \makeatother

\newdate{mydate}{21}{12}{2020}

\begin{document}

\nwfmt\displaydate{mydate}

\end{document}

Partha D.
  • 2,250