Skip to content

Commit

Permalink
More ?-quantifier preparation... adjust Temporal.pm to use **0..1 ins…
Browse files Browse the repository at this point in the history
…tead of ? .
  • Loading branch information
pmichaud committed Apr 29, 2013
1 parent a174307 commit 3252c3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Temporal.pm
Expand Up @@ -253,7 +253,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))**0..1 $/
or X::Temporal::InvalidFormat.new(
invalid-str => $format,
target => 'DateTime',
Expand Down

0 comments on commit 3252c3e

Please sign in to comment.