diff options
author | Yorhel <git@yorhel.nl> | 2008-12-17 14:02:53 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2008-12-17 14:02:53 +0100 |
commit | 4a4ea97e411902576d07d5a5bae97c55bda7c7bb (patch) | |
tree | 6ebac7b58d19cd3b0720fe33a2be392c8f276e91 /lib/VNDB/Handler/Misc.pm | |
parent | 32771b6b1799be558447fb19a0bcf3a79345f832 (diff) |
Moved age() to VNDB::Func
Diffstat (limited to 'lib/VNDB/Handler/Misc.pm')
-rw-r--r-- | lib/VNDB/Handler/Misc.pm | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/VNDB/Handler/Misc.pm b/lib/VNDB/Handler/Misc.pm index dc6bda71..7f7fee45 100644 --- a/lib/VNDB/Handler/Misc.pm +++ b/lib/VNDB/Handler/Misc.pm @@ -45,18 +45,6 @@ YAWF::register( ); -sub age { - my $a = time-$_[0]; - return sprintf '%d %s%s', - $a > 60*60*24*365*2 ? ( $a/60/60/24/365, 'years' ) : - $a > 60*60*24*(365/12)*2 ? ( $a/60/60/24/(365/12), 'months' ) : - $a > 60*60*24*7*2 ? ( $a/60/60/24/7, 'weeks' ) : - $a > 60*60*24*2 ? ( $a/60/60/24, 'days' ) : - $a > 60*60*2 ? ( $a/60/60, 'hours' ) : - $a > 60*2 ? ( $a/60, 'min' ) : - ( $a, 'sec' ), - $_[1]?'':' ago'; -} sub homepage { my $self = shift; |