Revision 2daee349
Von Sven Schöling vor mehr als 10 Jahren hinzugefügt
SL/Locale.pm | ||
---|---|---|
364 | 364 |
($yy, $mm, $dd) = ($date =~ /(..)(..)(..)/); |
365 | 365 |
} |
366 | 366 |
|
367 |
$dd *= 1;
|
|
368 |
$mm *= 1;
|
|
367 |
$_ ||= 0 for ($dd, $mm, $yy);
|
|
368 |
$_ *= 1 for ($dd, $mm, $yy);
|
|
369 | 369 |
$yy = ($yy < 70) ? $yy + 2000 : $yy; |
370 | 370 |
$yy = ($yy >= 70 && $yy <= 99) ? $yy + 1900 : $yy; |
371 | 371 |
|
... | ... | |
383 | 383 |
my ($date_str, $time_str) = split m{\s+}, $string, 2; |
384 | 384 |
my ($yy, $mm, $dd) = $self->parse_date(\%params, $date_str); |
385 | 385 |
|
386 |
my $millisecond = 0; |
|
387 |
my ($hour, $minute, $second) = split m/:/, $time_str; |
|
388 |
($second, $millisecond) = split quotemeta($num_separator), $second, 2; |
|
386 |
my ($hour, $minute, $second) = split m/:/, ($time_str || ''); |
|
387 |
$second ||= '0'; |
|
388 |
|
|
389 |
($second, my $millisecond) = split quotemeta($num_separator), $second, 2; |
|
390 |
$_ ||= 0 for ($hour, $minute, $millisecond); |
|
391 |
|
|
389 | 392 |
$millisecond = substr $millisecond, 0, 3; |
390 | 393 |
$millisecond .= '0' x (3 - length $millisecond); |
391 | 394 |
|
Auch abrufbar als: Unified diff
Locale: Warnungen