Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Deprecate argument-less Date.new, as it seems to confuse everybody ex…
…cept me
  • Loading branch information
moritz committed Dec 8, 2015
1 parent 036e19a commit 240b9ae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/Temporal.pm
Expand Up @@ -543,6 +543,11 @@ my class Date does Dateish {
}

multi method new() {
DEPRECATED(
:what('Date.new() without arguments as a way to get the Christmas date'),
'Date.new(self.today.year, 12, 24)',
'2015.12',
);
my $n = self.today;
if $n.month == 12 && $n.day >= 24 {
self.new($n.year + 1, 12, 24);
Expand Down

0 comments on commit 240b9ae

Please sign in to comment.