PWC 175
PWC 175 Challenge 1 -- Last Sunday Challenge 1 asks us to find the last Sunday of every month in a particular year, say 2022. This is easy to do in Perl thanks to the Date::Manip suite of modules, which bristles with options, including a straightforward way to do this. The specific module useful here is Date::Manip::Recur With this module it's as easy as saying: $date_recur_object -> parse( " last Sunday of every month in 2022 " ); which is exactly what I do. In Raku, it's a bit more difficult, but still easy via Raku's excellent and well-documented built-in Date objects. Pretty much a matter of looping through the last 10 days of each month, picking up the Sundays in that stretch, and then keeping the last Sunday. Julia is similar to Raku in its Dates handling, except that the Dates are not built-in, but a short library call away. I could have translated my Raku script line-for-line to Julia, but I have the minor difference that I used multiple dispatch in R