Bugzilla – Attachment 17524 Details for
Bug 9084
Dates in notices should be formatted according to dateformat system preference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9084 - Dates in notices should be formatted according to dateformat system preference
Bug-9084---Dates-in-notices-should-be-formatted-ac.patch (text/plain), 1.52 KB, created by
Mason James
on 2013-04-18 14:11:34 UTC
(
hide
)
Description:
Bug 9084 - Dates in notices should be formatted according to dateformat system preference
Filename:
MIME Type:
Creator:
Mason James
Created:
2013-04-18 14:11:34 UTC
Size:
1.52 KB
patch
obsolete
>From 8ae174c1eb5ea54c6db0d9b9af3c6ce6ee00b9fc Mon Sep 17 00:00:00 2001 >From: Mason James <mtj@kohaaloha.com> >Date: Wed, 17 Apr 2013 22:47:26 +1200 >Subject: [PATCH] Bug 9084 - Dates in notices should be formatted according to dateformat system preference >Content-Type: text/plain; charset="utf-8" > >--- > C4/Letters.pm | 17 +++++++++++++++++ > 1 files changed, 17 insertions(+), 0 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index fdbb473..305d502 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -34,6 +34,8 @@ use Date::Calc qw( Add_Delta_Days ); > use Encode; > use Carp; > >+use Data::Printer; >+ > use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); > > BEGIN { >@@ -617,7 +619,22 @@ sub _parseletter { > $letter->{content} =~ s/<<today>>/$todaysdate/go; > } > >+ my @dates = qq| issues.date_due issues.date old_issues.date_due >+ old_issues.returndate old_issues.issuedate |; >+ > while ( my ($field, $val) = each %$values ) { >+ >+ # Bug 9084 - Dates in notices should be formatted >+ # according to dateformat system preference >+ my $match = "$table.$field"; >+ if ( grep /$match/, @dates ) { >+ >+ #display dateonly, if timestamp has trailing '23:59:00' >+ my $dateonly = 0; >+ $dateonly = 1 if $val =~ /23:59:00$/; >+ $val = output_pref( dt_from_string($val), undef, undef, $dateonly ); >+ } >+ > my $replacetablefield = "<<$table.$field>>"; > my $replacefield = "<<$field>>"; > $val =~ s/\p{P}(?=$)//g if $val; >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9084
:
17524
|
17525
|
17526
|
17827
|
17828