Skip to content

Commit

Permalink
Restore *exact* year stringification in Date/DateTime
Browse files Browse the repository at this point in the history
This should fix some Blin fallout
  • Loading branch information
lizmat committed Feb 18, 2020
1 parent 1cc43c8 commit 2b7d5ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core.c/Date.pm6
Expand Up @@ -3,7 +3,7 @@ my class Date does Dateish {
method !formatter(--> Str:D) {
my $parts := nqp::list_s;
nqp::push_s($parts, $!year < 1000 || $!year > 9999
?? sprintf('%+05d',$!year)
?? self!year-Str
!! nqp::tostr_I($!year)
);
nqp::push_s($parts, $!month < 10
Expand Down
2 changes: 1 addition & 1 deletion src/core.c/DateTime.pm6
Expand Up @@ -10,7 +10,7 @@ my class DateTime does Dateish {
method !formatter() { # ISO 8601 timestamp
my $parts := nqp::list_s;
nqp::push_s($parts, $!year < 1000 || $!year > 9999
?? sprintf('%+05d',$!year)
?? self!year-Str
!! nqp::tostr_I($!year)
);

Expand Down

0 comments on commit 2b7d5ff

Please sign in to comment.