summaryrefslogtreecommitdiff
path: root/fml/lib/FML
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-01-26 17:55:16 +0000
committerfukachan <fukachan>2001-01-26 17:55:16 +0000
commitbf1d95a899de9fcf71bd45082a9de19ffef1fe7f (patch)
treefdd3a8bec40a19c86a92830791df3c2f8c4caa50 /fml/lib/FML
parentbe4dd9aece35dfaab93fc59b990774397716d6ee (diff)
downloadfml8-bf1d95a899de9fcf71bd45082a9de19ffef1fe7f.tar.gz
fml8-bf1d95a899de9fcf71bd45082a9de19ffef1fe7f.tar.bz2
fml8-bf1d95a899de9fcf71bd45082a9de19ffef1fe7f.zip
create $date->{YYYY/MM/DD} value
define YYYY_MM_DD() method for it
Diffstat (limited to 'fml/lib/FML')
-rw-r--r--fml/lib/FML/Date.pm11
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) = @_;