From 14809df133ffc55d08d20b4b6b05924235ba0645 Mon Sep 17 00:00:00 2001 From: wolfpac444 Date: Wed, 26 Mar 2003 04:42:56 +0000 Subject: [PATCH] *** empty log message *** --- C4/Date.pm | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/C4/Date.pm b/C4/Date.pm index f6c1e5859b..5e3a6cfdd6 100644 --- a/C4/Date.pm +++ b/C4/Date.pm @@ -17,10 +17,10 @@ $VERSION = 0.01; @EXPORT = qw( &display_date_format &format_date - &format_date_in_iso ); + sub get_date_format { #Get the database handle @@ -68,19 +68,16 @@ sub format_date if ( $dateformat eq "us" ) { - Date_Init("DateFormat=US"); $olddate = ParseDate($olddate); $newdate = UnixDate($olddate,'%m/%d/%Y'); } elsif ( $dateformat eq "metric" ) { - Date_Init("DateFormat=metric"); $olddate = ParseDate($olddate); $newdate = UnixDate($olddate,'%d/%m/%Y'); } elsif ( $dateformat eq "iso" ) { - Date_Init("DateFormat=iso"); $olddate = ParseDate($olddate); $newdate = UnixDate($olddate,'%Y-%m-%d'); } @@ -90,35 +87,4 @@ sub format_date } } -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; -- 2.11.0