Created
June 9, 2020 09:30
-
-
Save JRaspass/5adacfd08ba6081f4f7e1bc68be72456 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $date = '09 May 2008'; | |
constant %months = enum «:1Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec»; | |
$date ~~ / $<day> = \d+ ' ' $<month> = @( %months.keys ) ' ' $<year> = \d+ /; | |
say Date.new: |$/.hash, :month( %months{ $<month> } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment