diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-01-22 17:47:52 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-01-22 17:47:52 +0000 |
commit | 71c4b7a598c6b0b441eef63b1e1e016bd45e9991 (patch) | |
tree | b6d3b99fb0a1df702ce908bee7447a4345483565 /perllib/Page.pm | |
parent | 5cb1d987e8a7abd25c2a256ad167fcde47b0b2ed (diff) | |
parent | ab6c078efbbb3fd01da903d0f6b076186371a1f9 (diff) |
Merge branch 'master' into reportemptyhomes
Diffstat (limited to 'perllib/Page.pm')
-rw-r--r-- | perllib/Page.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm index 917fc6991..817a56761 100644 --- a/perllib/Page.pm +++ b/perllib/Page.pm @@ -444,7 +444,7 @@ EOF } sub prettify_epoch { - my ($q, $s) = @_; + my ($q, $s, $short) = @_; my $cobrand = get_cobrand($q); my $cobrand_datetime = Cobrand::prettify_epoch($cobrand, $s); return $cobrand_datetime if ($cobrand_datetime); @@ -455,6 +455,8 @@ sub prettify_epoch { $tt = "$tt " . _('today'); } elsif (strftime('%Y %U', @s) eq strftime('%Y %U', @t)) { $tt = "$tt, " . strftime('%A', @s); + } elsif ($short) { + $tt = "$tt, " . strftime('%e %b %Y', @s); } elsif (strftime('%Y', @s) eq strftime('%Y', @t)) { $tt = "$tt, " . strftime('%A %e %B %Y', @s); } else { |