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:
parent
74b688810f
commit
991aac998a
5 changed files with 85 additions and 15 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue