Date format: Difference between revisions

→‎{{header|Raku}}: Whither October?!
(→‎{{header|Raku}}: switch to Date for libraryless example)
(→‎{{header|Raku}}: Whither October?!)
Line 2,694:
They don't include the longer format specified in the task, but you can always roll your own formatter instead of importing the library:
 
<lang perl6>my @months = <January February March April May June July
July August September October November December>;
my @days = <Sunday Monday Tuesday Wednesday Thursday Friday Saturday>;
my $us-long = sub ($self) { "{@days[$self.day-of-week]}, {@months[$self.month - 1]} {$self.day}, {$self.year}" };
my $d = Date.today :formatter($us-long);
 
1,481

edits