Date format: Difference between revisions

m
m (syntax highlighting fixup automation)
Line 2,249:
=={{header|Joy}}==
<syntaxhighlight lang="joy">
DEFINE weekdays == [ "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" "Sunday" ];
months == [ "January" "February" "March" "April" "May" "June" "July" "August"
"September" "October" "November" "December" ].
 
time localtime [ [0 at 'd 4 4 format] ["-"] [1 at 'd 2 2 format] ["-"] [2 at 'd 2 2 format] ]
[i] map [putchars] step '\n putch pop.
 
time localtime [ [8 at pred weekdays of] [", "] [1 at pred months of] [" "] [2 at 'd 1 1 format]
[", "] [0 at 'd 4 4 format] ] [i] map [putchars] step '\n putch pop.
</syntaxhighlight>
 
153

edits