aboutsummaryrefslogtreecommitdiffstats
path: root/lib/WWW/StrawViewer/Utils.pm
diff options
context:
space:
mode:
authortrizen <trizen@protonmail.com>2020-02-26 09:22:46 +0200
committertrizen <trizen@protonmail.com>2020-02-26 09:22:46 +0200
commit677e3367377ee3d86268ec3df4396980f6b253ac (patch)
tree72186468893a88759848d48a5a52c9a1393f93e3 /lib/WWW/StrawViewer/Utils.pm
parent0d4bcd362455bbbe245f3b1b8a5b7bc1f4ed2ac3 (diff)
downloadfair-viewer-677e3367377ee3d86268ec3df4396980f6b253ac.tar.lz
fair-viewer-677e3367377ee3d86268ec3df4396980f6b253ac.tar.xz
fair-viewer-677e3367377ee3d86268ec3df4396980f6b253ac.zip
new file: META.json
new file: META.yml
Diffstat (limited to 'lib/WWW/StrawViewer/Utils.pm')
-rw-r--r--lib/WWW/StrawViewer/Utils.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/WWW/StrawViewer/Utils.pm b/lib/WWW/StrawViewer/Utils.pm
index f70afc0..153aab9 100644
--- a/lib/WWW/StrawViewer/Utils.pm
+++ b/lib/WWW/StrawViewer/Utils.pm
@@ -593,6 +593,10 @@ sub get_publication_age_approx {
return "$1d";
}
+ if ($age =~ /^(\d+) week/) {
+ return "$1w";
+ }
+
if ($age =~ /^(\d+) month/) {
return "$1m";
}