Skip to content


Subversion checkout URL

You can clone with
Download ZIP
tree: ad1054a94f
Fetching contributors…

Cannot retrieve contributors at this time

38 lines (22 sloc) 0.756 kB
use v6;
=begin pod
=head1 Last fridays of the year
Write a program or a script that returns the last Fridays of each month
of a given year. The year may be given through any simple input method
in your language (command line, std in, etc.).
=head1 More
=end pod
sub MAIN (Int $year = {
my @fri;
for"$year-01-01") .."$year-12-31") {
@fri[.month] = .Str if .day-of-week == 5;
.say for @fri[1..12];
=begin pod
=head1 Features used
The MAIN sub - L<>
Date objects - L<>
=end pod
# vim: expandtab shiftwidth=2 ft=perl6:
Jump to Line
Something went wrong with that request. Please try again.