summaryrefslogtreecommitdiff
path: root/lib/VNDB/L10N.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-12-17 08:41:00 +0100
committerYorhel <git@yorhel.nl>2009-12-17 08:42:21 +0100
commit9f8428ad00569e6e269dd7c8e442940e6d82f368 (patch)
treef9714ca29f51458643cd2c23df2d72afdccfbf74 /lib/VNDB/L10N.pm
parent1e8ccf70c95ab51677d2d294d832efdb908deb14 (diff)
L10N: Make date/time formats configurable for each language
Diffstat (limited to 'lib/VNDB/L10N.pm')
-rw-r--r--lib/VNDB/L10N.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/VNDB/L10N.pm b/lib/VNDB/L10N.pm
index 8698cb74..9b9d2a82 100644
--- a/lib/VNDB/L10N.pm
+++ b/lib/VNDB/L10N.pm
@@ -73,12 +73,10 @@ use warnings;
}
# argument: unix timestamp and optional format (compact/full)
- # return value: yyyy-mm-dd
- # (maybe an idea to use cgit-style ages for recent timestamps)
sub date {
my($s, $t, $f) = @_;
- return strftime '%Y-%m-%d', gmtime $t if !$f || $f eq 'compact';
- return strftime '%Y-%m-%d at %R', gmtime $t;
+ return strftime $s->maketext('_datetime_compact'), gmtime $t if !$f || $f eq 'compact';
+ return strftime $s->maketext('_datetime_full'), gmtime $t;
}
# argument: database release date format (yyyymmdd)