diff options
author | Struan Donald <struan@exo.org.uk> | 2013-02-05 10:12:35 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-02-05 10:12:35 +0000 |
commit | f31b397c334895b73a40c30594025068e31561f5 (patch) | |
tree | b052f3d6192839bf4ecdfec0df437477e2774e4d /perllib | |
parent | 7d6c549161f71670ceea286554e831369e8eb588 (diff) |
Add prettify_dt method to cobrand and to zurich cobrand so we can use
it on the ajax report details call
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 15 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Zurich.pm | 7 |
2 files changed, 22 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 0c8d567c4..8da9ec883 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -795,5 +795,20 @@ sub show_unconfirmed_reports { 0; } +=head2 prettify_dt + + my $date = $c->prettify_dt( $datetime ); + +Takes a datetime object and returns a string representation. + +=cut + +sub prettify_dt { + my $self = shift; + my $dt = shift; + + return Utils::prettify_dt( $dt, 1 ); +} + 1; diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm index 81173239f..3af086a24 100644 --- a/perllib/FixMyStreet/Cobrand/Zurich.pm +++ b/perllib/FixMyStreet/Cobrand/Zurich.pm @@ -44,6 +44,13 @@ sub uri { return $uri; } +sub prettify_dt { + my $self = shift; + my $dt = shift; + + return Utils::prettify_dt( $dt, 'zurich' ); +} + sub remove_redundant_areas { my $self = shift; my $all_areas = shift; |