X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=C4%2FDates.pm;h=4fd08aeb6c4e94a744652b321202d313cd531eb5;hb=4958a8a0f67d04c41eb300d9247c915f2346acf0;hp=e61fc1973198783a19fdb771fe60f02bb148978e;hpb=c2bba3ffc89ffae78635bf271eaccce7c60c22df;p=koha.git diff --git a/C4/Dates.pm b/C4/Dates.pm index e61fc19731..4fd08aeb6c 100644 --- a/C4/Dates.pm +++ b/C4/Dates.pm @@ -1,5 +1,9 @@ package C4::Dates; +# Copyright 2007 Liblime +# Parts Copyright ACPL 2011 +# Parts Copyright Catalyst IT 2012 +# # This file is part of Koha. # # Koha is free software; you can redistribute it and/or modify it under the @@ -11,9 +15,9 @@ package C4::Dates; # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use strict; use warnings; @@ -27,7 +31,7 @@ use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); use vars qw($debug $cgi_debug); BEGIN { - $VERSION = 0.04; + $VERSION = 3.07.00.049; @ISA = qw(Exporter); @EXPORT_OK = qw(format_date_in_iso format_date); } @@ -41,6 +45,12 @@ sub _prefformat { return $prefformat; } +sub reset_prefformat { # subroutine to clear the prefformat, called when we change it + if (defined $prefformat){ + $prefformat = C4::Context->preference('dateformat'); + } +} + our %format_map = ( iso => 'yyyy-mm-dd', # plus " HH:MM:SS" metric => 'dd/mm/yyyy', # plus " HH:MM:SS"