Revision 0ffc7f6b
Von Moritz Bunkus vor etwa 9 Jahren hinzugefügt
SL/Locale.pm | ||
---|---|---|
394 | 394 |
|
395 | 395 |
return undef if !defined $string; |
396 | 396 |
|
397 |
return DateTime->today_local if lc($string) eq 'today'; |
|
398 |
return DateTime->today_local->subtract(days => 1) if lc($string) eq 'yesterday'; |
|
399 |
|
|
397 | 400 |
$params{dateformat} ||= $::myconfig{dateformat} || 'yy-mm-dd'; |
398 | 401 |
$params{numberformat} ||= $::myconfig{numberformat} || '1,000.00'; |
399 | 402 |
my $num_separator = $params{numberformat} =~ m{,\d+$} ? ',' : '.'; |
Auch abrufbar als: Unified diff
Locale::parse_date_to_object: "yesterday" und "today" als Angaben unterstützen