summaryrefslogtreecommitdiff
path: root/lib/JWebmail/View
diff options
context:
space:
mode:
Diffstat (limited to 'lib/JWebmail/View')
-rw-r--r--lib/JWebmail/View/Webmail.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/JWebmail/View/Webmail.pm b/lib/JWebmail/View/Webmail.pm
index 464c97e..778253d 100644
--- a/lib/JWebmail/View/Webmail.pm
+++ b/lib/JWebmail/View/Webmail.pm
@@ -46,12 +46,14 @@ sub print_sizes2 {
my sub dgt { "([[:digit:]]{$_[0]})" }
sub parse_iso_date {
- shift;
+ my ($_self, $in) = @_;
+
state $rx = do { my $re = dgt(4).'-'.dgt(2).'-'.dgt(2).'T'.dgt(2).':'.dgt(2).':'.dgt(2); qr/$re/a };
- my @d = shift =~ /$rx/;
+
+ my @d = $in =~ /$rx/;
if (@d != 6) {
# TODO
- warn "issue when parsing date";
+ warn "issue when parsing date '$in'";
}
return {
year => $d[0],