diff options
| author | Simon Proctor <simon.proctor@zpg.co.uk> | 2019-10-14 09:08:45 +0100 |
|---|---|---|
| committer | Simon Proctor <simon.proctor@zpg.co.uk> | 2019-10-14 09:08:45 +0100 |
| commit | 00c33942bfac80ca85b6aa6c3a57207fd263fec3 (patch) | |
| tree | 6198bc619abd567901bb0ce66ac31a5b6f3a7df7 /challenge-030 | |
| parent | c8131ef302ed9a1ee79773aec04eb69aca287132 (diff) | |
| download | perlweeklychallenge-club-00c33942bfac80ca85b6aa6c3a57207fd263fec3.tar.gz perlweeklychallenge-club-00c33942bfac80ca85b6aa6c3a57207fd263fec3.tar.bz2 perlweeklychallenge-club-00c33942bfac80ca85b6aa6c3a57207fd263fec3.zip | |
Challenge 1 : Christmas sundays
Diffstat (limited to 'challenge-030')
| -rw-r--r-- | challenge-030/simon-proctor/perl6/ch-1.p6 | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/challenge-030/simon-proctor/perl6/ch-1.p6 b/challenge-030/simon-proctor/perl6/ch-1.p6 new file mode 100644 index 0000000000..b39d3a14dc --- /dev/null +++ b/challenge-030/simon-proctor/perl6/ch-1.p6 @@ -0,0 +1,8 @@ +#!/usr/bin/env perl6 + +use v6; + +#! Print all the sunday christmases from 2019 until 2100 +sub MAIN() { + .say for (2019..2100).map( { Date.new( :year($_), :day(25), :month(12) ) } ).grep( *.day-of-week == 7 ); +} |
