This commit is contained in:
wolfpac444 2003-03-28 23:03:51 +00:00
parent 333e222461
commit ca0bf13bd0
2 changed files with 1 additions and 37 deletions

View File

@ -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;

View File

@ -39,7 +39,6 @@ Are any of our records incorrect? Have you moved recently, got a new phone numbe
<TMPL_IF NAME="amountoverzero">
<table cellpadding=5 cellspacing=0 border=1>
<tr bgcolor="#fecc99">
<td>
<td><font face="arial,helvetica" size=+2><B>You have Outstanding charges and fines of <TMPL_VAR NAME="amountoutstanding"></B></font>
</td></tr></table>
</TMPL_IF>
@ -47,7 +46,6 @@ Are any of our records incorrect? Have you moved recently, got a new phone numbe
<TMPL_IF NAME"amountlessthanzero">
<table cellpadding=5 cellspacing=0 border=1>
<tr bgcolor="#fecc99">
<td>
<td><font face="arial,helvetica" size=+2><B>You have a credit of <TMPL_VAR NAME="amountoutstanding"></B></font>
</td></tr></table>
</TMPL_IF>