[Koha-cvs] koha/C4 Date.pm
Joshua Ferraro
jmf at liblime.com
Sat Mar 10 01:28:11 CET 2007
CVSROOT: /sources/koha
Module name: koha
Changes by: Joshua Ferraro <kados> 07/03/10 00:28:11
Modified files:
C4 : Date.pm
Log message:
adding back get_date_format_string_for_DHTMLcalendar
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Date.pm?cvsroot=koha&r1=1.27&r2=1.28
Patches:
Index: Date.pm
===================================================================
RCS file: /sources/koha/koha/C4/Date.pm,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- Date.pm 9 Mar 2007 23:36:24 -0000 1.27
+++ Date.pm 10 Mar 2007 00:28:11 -0000 1.28
@@ -28,6 +28,7 @@
@EXPORT = qw(
&display_date_format
+ &get_date_format_string_for_DHTMLcalendar
&format_date
&format_date_in_iso
);
@@ -62,6 +63,24 @@
}
}
+sub get_date_format_string_for_DHTMLcalendar {
+ my $dateformat = get_date_format();
+
+ if ( $dateformat eq 'us' ) {
+ return '%m/%d/%Y';
+ }
+ elsif ( $dateformat eq 'metric' ) {
+ return '%d/%m/%Y';
+ }
+ elsif ( $dateformat eq "iso" ) {
+ return '%Y-%m-%d';
+ }
+ else {
+ return 'Invalid date format: '
+ . $dateformat . '.'
+ . ' Please change in system preferences';
+ }
+}
sub format_date
{
More information about the Koha-cvs
mailing list