Date object "forgets" formatter?

Looks like this was an oversight in the dispatch to new-from-daycount, which got fixed with: https://github.com/rakudo/rakudo/commit/ac11774d73 .

I think this should fix all issues. Please do make an issue at https://github.com/rakudo/rakudo/issues/new if not.


@elizabeth - this fixed the issue when adding days, but not other intervals. I guess the same fix has to be done on multiple locations.

This fixed the problem for iterating days, but not for months, years, etc.

> my $d = Date.new(2019,12,24, formatter => { sprintf "%04d/%02d", .year, .month };
2019/12

> $d.later(:1day);
2019/12

...but...

> $d.later(:1month);  
2020-01-24

Tags:

Raku