aboutsummaryrefslogtreecommitdiff
path: root/challenge-227
diff options
context:
space:
mode:
authorScimon <simon.proctor@gmail.com>2023-07-24 10:13:54 +0100
committerScimon <simon.proctor@gmail.com>2023-07-24 10:13:54 +0100
commite95d4e36d8582956966a1ebd3cd7df48ab39089b (patch)
treec53ea4c02205cbad16e9b5fdfd9fcf9613b3e80a /challenge-227
parente4bdf5dcb6e741f1fb8e1b145fd2111f05ed6445 (diff)
downloadperlweeklychallenge-club-e95d4e36d8582956966a1ebd3cd7df48ab39089b.tar.gz
perlweeklychallenge-club-e95d4e36d8582956966a1ebd3cd7df48ab39089b.tar.bz2
perlweeklychallenge-club-e95d4e36d8582956966a1ebd3cd7df48ab39089b.zip
Challenge 1
Diffstat (limited to 'challenge-227')
-rw-r--r--challenge-227/simon-proctor/raku/ch-1.raku12
1 files changed, 12 insertions, 0 deletions
diff --git a/challenge-227/simon-proctor/raku/ch-1.raku b/challenge-227/simon-proctor/raku/ch-1.raku
new file mode 100644
index 0000000000..4cfb804d05
--- /dev/null
+++ b/challenge-227/simon-proctor/raku/ch-1.raku
@@ -0,0 +1,12 @@
+#!/usr/bin/env raku
+
+#| Given a year between 1753 and 9999 print the number of friday the 13ths
+sub MAIN(
+ Int() $year where 1753 <= * <= 9999 #= Year between 1753 and 9999
+) {
+ (1..12)
+ .map( -> $m { Date.new($year,$m,13) } )
+ .grep( -> $d { $d.day-of-week == 5 } )
+ .elems
+ .say;
+}