added custom handling to the %D format to remove initial space in single space days.
This commit is contained in:
parent
a91bc9c154
commit
b4bc36d23d
1 changed files with 7 additions and 2 deletions
|
|
@ -323,7 +323,7 @@ sub epochToHuman {
|
|||
"c" => "B",
|
||||
"C" => "b",
|
||||
"d" => "d",
|
||||
"D" => "e",
|
||||
"D" => "_varday_",
|
||||
"h" => "I",
|
||||
"H" => "l",
|
||||
"j" => "H",
|
||||
|
|
@ -346,10 +346,15 @@ sub epochToHuman {
|
|||
my $replacement = $conversion{$key};
|
||||
$output =~ s/\~$key/\%$replacement/g;
|
||||
}
|
||||
#--- %M
|
||||
|
||||
$output = $dt->strftime($output);
|
||||
|
||||
#--- %M
|
||||
$temp = int($dt->month);
|
||||
$output =~ s/\%_varmonth_/$temp/g;
|
||||
#-- %D
|
||||
$temp = int($dt->day);
|
||||
$output =~ s/\%_varday_/$temp/g;
|
||||
#--- return
|
||||
return $output;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue