From date to week of year, month of year, day of year
You have a date and want week of year, month of year, day of year
#!/usr/bin/env raku
use v6;
my $d = Date.new("1966-08-04");
say "{$d.week-number} {$d.month} {$d.day-of-year}";
# vim: expandtab shiftwidth=4 ft=perl6
See Also
01strings
Perl 6 Cookbook: Introduction to Strings
01strings
Converting between characters and numbers.
01strings
Reversing a String by Word or Character
01strings
Trimming whitespace from both ends of a string
04arrays
Specifying a list in your program
The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society.
All rights reserved.