Fixed a date problem where the ^D macro was not working properly.
This commit is contained in:
parent
b2edd00fa8
commit
ef533cc56e
2 changed files with 11 additions and 13 deletions
|
|
@ -195,7 +195,7 @@ sub epochToHuman {
|
|||
$output =~ s/\%d/$value/g;
|
||||
$output =~ s/\%D/$date[2]/g;
|
||||
if ($output =~ /\%w/) {
|
||||
$day = getDayName($date[6]);
|
||||
$day = getDayName($date[7]);
|
||||
$output =~ s/\%w/$day/g;
|
||||
}
|
||||
#---hour stuff
|
||||
|
|
@ -301,19 +301,21 @@ sub getMonthName {
|
|||
=cut
|
||||
|
||||
sub getDayName {
|
||||
if ($_[0] == 1) {
|
||||
my $day = $_[0];
|
||||
$day++;
|
||||
if ($day == 1) {
|
||||
return WebGUI::International::get(27);
|
||||
} elsif ($_[0] == 2) {
|
||||
} elsif ($day == 2) {
|
||||
return WebGUI::International::get(28);
|
||||
} elsif ($_[0] == 2) {
|
||||
} elsif ($day == 3) {
|
||||
return WebGUI::International::get(29);
|
||||
} elsif ($_[0] == 2) {
|
||||
} elsif ($day == 4) {
|
||||
return WebGUI::International::get(30);
|
||||
} elsif ($_[0] == 2) {
|
||||
} elsif ($day == 5) {
|
||||
return WebGUI::International::get(31);
|
||||
} elsif ($_[0] == 2) {
|
||||
} elsif ($day == 6) {
|
||||
return WebGUI::International::get(32);
|
||||
} elsif ($_[0] == 2) {
|
||||
} elsif ($day == 7) {
|
||||
return WebGUI::International::get(33);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,11 +18,7 @@ use WebGUI::Macro;
|
|||
sub _replacement {
|
||||
my (@param, $temp);
|
||||
@param = WebGUI::Macro::getParams($_[0]);
|
||||
if ($param[0] ne "") {
|
||||
$temp = epochToHuman(time(),$param[0]);
|
||||
} else {
|
||||
$temp = localtime(time());
|
||||
}
|
||||
$temp = epochToHuman(time(),$param[0]);
|
||||
return $temp;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue