diff options
| -rw-r--r-- | fml/lib/FML/Date.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fml/lib/FML/Date.pm b/fml/lib/FML/Date.pm index 53b23764..8c6541ca 100644 --- a/fml/lib/FML/Date.pm +++ b/fml/lib/FML/Date.pm @@ -93,6 +93,9 @@ sub _date $date->{'YYYYMMDD'} = sprintf("%04d%02d%02d", 1900 + $year, $mon + 1, $mday); + + $date->{'YYYY/MM/DD'} = + sprintf("%04d/%02d/%02d", 1900 + $year, $mon + 1, $mday); $date->{'current_time'} = sprintf("%04d%02d%02d%02d%02d", @@ -130,6 +133,14 @@ sub YYYYMMDD } +sub YYYY_MM_DD +{ + my ($self, $time) = @_; + my $p = _date($time || time); + $p->{'YYYY/MM/DD'}; +} + + sub current_time { my ($self, $time) = @_; |
