[Koha-cvs] CVS: koha/C4 Date.pm,1.4,1.5

Mike Hansen wolfpac444 at users.sourceforge.net
Wed Mar 26 05:42:58 CET 2003


Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv16759/koha/C4

Modified Files:
	Date.pm 
Log Message:


Index: Date.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Date.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** Date.pm	26 Mar 2003 04:09:07 -0000	1.4
--- Date.pm	26 Mar 2003 04:42:56 -0000	1.5
***************
*** 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 ----





More information about the Koha-cvs mailing list