[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Date.pm,1.6,1.7
From: |
Mike Hansen |
Subject: |
[Koha-cvs] CVS: koha/C4 Date.pm,1.6,1.7 |
Date: |
Fri, 28 Mar 2003 15:04:27 -0800 |
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv12423/koha/C4
Modified Files:
Date.pm
Log Message:
Fixed bug #241
Index: Date.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Date.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** Date.pm 26 Mar 2003 04:44:10 -0000 1.6
--- Date.pm 28 Mar 2003 23:03:51 -0000 1.7
***************
*** 18,25 ****
&display_date_format
&format_date
- &format_date_in_iso
);
sub get_date_format
{
--- 18,25 ----
&display_date_format
&format_date
);
+
sub get_date_format
{
***************
*** 69,73 ****
if ( $dateformat eq "us" )
{
- Date_Init("DateFormat=US");
$olddate = ParseDate($olddate);
$newdate = UnixDate($olddate,'%m/%d/%Y');
--- 69,72 ----
***************
*** 75,79 ****
elsif ( $dateformat eq "metric" )
{
- Date_Init("DateFormat=metric");
$olddate = ParseDate($olddate);
$newdate = UnixDate($olddate,'%d/%m/%Y');
--- 74,77 ----
***************
*** 81,85 ****
elsif ( $dateformat eq "iso" )
{
- Date_Init("DateFormat=iso");
$olddate = ParseDate($olddate);
$newdate = UnixDate($olddate,'%Y-%m-%d');
--- 79,82 ----
***************
*** 91,124 ****
}
- sub format_date_in_iso
- {
- my $olddate = shift;
- my $newdate;
-
- my $dateformat = get_date_format();
-
- if ( $dateformat eq "us" )
- {
- Date_Init("DateFormat=US");
- $olddate = ParseDate($olddate);
- }
- elsif ( $dateformat eq "metric" )
- {
- Date_Init("DateFormat=metric");
- $olddate = ParseDate($olddate);
- }
- elsif ( $dateformat eq "iso" )
- {
- Date_Init("DateFormat=iso");
- $olddate = ParseDate($olddate);
- }
- else
- {
- return "9999-99-99";
- }
-
- $newdate = UnixDate($olddate, '%Y-%m-%d');
-
- return $newdate;
- }
1;
--- 88,90 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Date.pm,1.6,1.7,
Mike Hansen <=