Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Temporal] accept colon in the timezone offset
  • Loading branch information
cbvi committed Jul 8, 2014
1 parent 9013d8f commit 78e1fa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Temporal.pm
Expand Up @@ -251,7 +251,7 @@ my class DateTime does Dateish {
}

multi method new(Str $format, :$timezone is copy = 0, :&formatter=&default-formatter) {
$format ~~ /^ (\d**4) '-' (\d\d) '-' (\d\d) T (\d\d) ':' (\d\d) ':' (\d\d) (Z || (<[\-\+]>) (\d\d)(\d\d))? $/
$format ~~ /^ (\d**4) '-' (\d\d) '-' (\d\d) T (\d\d) ':' (\d\d) ':' (\d\d) (Z || (<[\-\+]>) (\d\d) ':'? (\d\d))? $/
or X::Temporal::InvalidFormat.new(
invalid-str => $format,
target => 'DateTime',
Expand Down

0 comments on commit 78e1fa3

Please sign in to comment.