fix: t::WebGUI::PseudoRequest now works properly

add: Added some additional vars to Calendar Week view
fix: WebGUI::DateTime now handles MySQL strings more robustly
This commit is contained in:
Doug Bell 2007-03-20 17:27:30 +00:00
parent 74b688810f
commit 991aac998a
5 changed files with 85 additions and 15 deletions

View file

@ -611,16 +611,23 @@ DateTime
sub _splitMysql
{
my $string = shift;
my ($y,$m,$d,$h,$n,$s) = split /\D+/,$string;
my %hash = (
year => $y,
month => $m,
day => $d,
hour => $h,
minute => $n,
second => $s,
);
my %hash;
@hash{ qw( year month day hour minute second ) }
= $string =~ m{
(\d+) # Year
\D*
(\d+) # Month
\D*
(\d+) # Day
\D*
(\d+) # Hours
\D*
(\d+) # Minutes
\D*
(\d+) # Seconds
}x;
return %hash;
}