Restore a day of the week in date(1) output for Japanese locales.

It was lost by recent locale change.
This commit is contained in:
ume 2015-12-20 14:59:30 +00:00
parent baa84555c9
commit aebff6f6de
4 changed files with 17 additions and 6 deletions

View File

@ -63,7 +63,7 @@
Χ΋
#
# date_fmt
%Y年%m月%e日 %H:%M:%S %Z
%Y年%m月%e日 %A %H:%M:%S %Z
#
# Long month names (without case ending)
1ŒŽ

View File

@ -56,14 +56,14 @@
%Y/%m/%d
#
# c_fmt
%Y年%m月%e日 %H:%M:%S
%Y年%m月%e日 %A %H:%M:%S
#
# AM/PM
午前
午後
#
# date_fmt
%Y年%m月%e日 %H:%M:%S %Z
%Y年%m月%e日 %A %H:%M:%S %Z
#
# Long month names (without case ending)
1月

View File

@ -56,14 +56,14 @@
%Y/%m/%d
#
# c_fmt
%Y年%m月%e日 %H:%M:%S
%Y年%m月%e日 %A %H:%M:%S
#
# AM/PM
¸áÁ°
¸á¸å
#
# date_fmt
%Y年%m月%e日 %H:%M:%S %Z
%Y年%m月%e日 %A %H:%M:%S %Z
#
# Long month names (without case ending)
1·î

View File

@ -67,6 +67,7 @@ my %callback = (
mdorder => \&callback_mdorder,
altmon => \&callback_altmon,
cformat => \&callback_cformat,
dtformat => \&callback_dtformat,
cbabmon => \&callback_abmon,
data => undef,
);
@ -184,7 +185,7 @@ if ($TYPE eq "timedef") {
"c_fmt" => "<cformat<d_t_fmt<s",
"am_pm" => "as",
"d_fmt" => "s",
"d_t_fmt" => "s",
"d_t_fmt" => "<dtformat<d_t_fmt<s",
"altmon" => "<altmon<mon<as",
"md_order" => "<mdorder<d_fmt<s",
"t_fmt_ampm" => "s",
@ -201,6 +202,16 @@ sub callback_cformat {
return $s;
};
sub callback_dtformat {
my $s = shift;
my $nl = $callback{data}{l} . "_" . $callback{data}{c};
if ($nl eq 'ja_JP') {
$s =~ s/(> )(%H)/$1%A $2/;
}
return $s;
};
sub callback_mdorder {
my $s = shift;
return undef if (!defined $s);