aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Utils.pm
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2016-12-16 15:02:53 +0100
committerMarius Halden <marius.h@lden.org>2016-12-16 15:02:53 +0100
commitdbf56159e44c1560a413022451bf1a1c4cb22a52 (patch)
tree275599a1894ca48d8dbf3c2843064c3dbf4affc7 /perllib/Utils.pm
parenta1603b96cae9258761f8cc59d76e0512f49afc3d (diff)
parent38490f6ea18064c232bda6ebfbaee052bd8f0951 (diff)
Merge tag 'v2.0.1' into fiksgatami-dev-v2
Diffstat (limited to 'perllib/Utils.pm')
-rw-r--r--perllib/Utils.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/perllib/Utils.pm b/perllib/Utils.pm
index 84c09d09d..7dd2a3f39 100644
--- a/perllib/Utils.pm
+++ b/perllib/Utils.pm
@@ -178,16 +178,17 @@ sub prettify_dt {
}
$tt .= ', ' unless $type eq 'date';
if ($dt->strftime('%Y %U') eq $now->strftime('%Y %U')) {
- $tt .= decode_utf8($dt->strftime('%A'));
+ $tt .= $dt->strftime('%A');
} elsif ($type eq 'zurich') {
- $tt .= decode_utf8($dt->strftime('%e. %B %Y'));
+ $tt .= $dt->strftime('%e. %B %Y');
} elsif ($type eq 'short') {
- $tt .= decode_utf8($dt->strftime('%e %b %Y'));
+ $tt .= $dt->strftime('%e %b %Y');
} elsif ($dt->strftime('%Y') eq $now->strftime('%Y')) {
- $tt .= decode_utf8($dt->strftime('%A %e %B %Y'));
+ $tt .= $dt->strftime('%A %e %B %Y');
} else {
- $tt .= decode_utf8($dt->strftime('%a %e %B %Y'));
+ $tt .= $dt->strftime('%a %e %B %Y');
}
+ $tt = decode_utf8($tt) if !utf8::is_utf8($tt);
return $tt;
}