WeBWorK Main Forum

customize display of Day and Time

customize display of Day and Time

by Dick Lane -
Number of replies: 0
I would like to thank Danny Glin for his work to help us customize display of Day and Time info in header files.
http://webwork.maa.org/wiki/Dates,_Times,_and_Time_Zones
http://webwork.maa.org/wiki/Header_File_Variables

For instance,
$DueDateDayOfWeek, $DueDateDay $DueDateMonthWord, at $DueDateTime12
could display
Sunday, 02 February, at 11:00pm

Is there a simple way for $DueDateDay to display "2" rather than "02"?

I suspect across-the-board suppression of leading zeros is not the cure. E.g., time "08:05am" should not become "8:5am".