| 1 |
## |
| 2 |
## Chinese GB2312 tables (GB2312 byte encoding) |
| 3 |
## |
| 4 |
|
| 5 |
package Date::Language::Chinese_GB; |
| 6 |
|
| 7 |
use strict; |
| 8 |
use warnings; |
| 9 |
|
| 10 |
use Date::Language (); |
| 11 |
|
| 12 |
use base 'Date::Language'; |
| 13 |
|
| 14 |
our $VERSION = '2.35'; # VERSION: generated |
| 15 |
# ABSTRACT: Chinese localization for Date::Format (GB2312) |
| 16 |
|
| 17 |
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW); |
| 18 |
|
| 19 |
@DoW = ( |
| 20 |
"\xd0\xc7\xc6\xda\xc8\xd5", # 星期日 |
| 21 |
"\xd0\xc7\xc6\xda\xd2\xbb", # 星期一 |
| 22 |
"\xd0\xc7\xc6\xda\xb6\xfe", # 星期二 |
| 23 |
"\xd0\xc7\xc6\xda\xc8\xfd", # 星期三 |
| 24 |
"\xd0\xc7\xc6\xda\xcb\xc4", # 星期四 |
| 25 |
"\xd0\xc7\xc6\xda\xce\xe5", # 星期五 |
| 26 |
"\xd0\xc7\xc6\xda\xc1\xf9", # 星期六 |
| 27 |
); |
| 28 |
|
| 29 |
@MoY = ( |
| 30 |
"\xd2\xbb\xd4\xc2", # 一月 |
| 31 |
"\xb6\xfe\xd4\xc2", # 二月 |
| 32 |
"\xc8\xfd\xd4\xc2", # 三月 |
| 33 |
"\xcb\xc4\xd4\xc2", # 四月 |
| 34 |
"\xce\xe5\xd4\xc2", # 五月 |
| 35 |
"\xc1\xf9\xd4\xc2", # 六月 |
| 36 |
"\xc6\xdf\xd4\xc2", # 七月 |
| 37 |
"\xb0\xcb\xd4\xc2", # 八月 |
| 38 |
"\xbe\xc5\xd4\xc2", # 九月 |
| 39 |
"\xca\xae\xd4\xc2", # 十月 |
| 40 |
"\xca\xae\xd2\xbb\xd4\xc2", # 十一月 |
| 41 |
"\xca\xae\xb6\xfe\xd4\xc2", # 十二月 |
| 42 |
); |
| 43 |
|
| 44 |
@DoWs = map { $_ } @DoW; |
| 45 |
@MoYs = map { $_ } @MoY; |
| 46 |
|
| 47 |
@AMPM = ( |
| 48 |
"\xc9\xcf\xce\xe7", # 上午 |
| 49 |
"\xcf\xc2\xce\xe7", # 下午 |
| 50 |
); |
| 51 |
|
| 52 |
@Dsuf = ("\xc8\xd5") x 31; # 日 |
| 53 |
|
| 54 |
Date::Language::_build_lookups(); |
| 55 |
|
| 56 |
# Formatting routines |
| 57 |
|
| 58 |
sub format_a { $DoWs[$_[0]->[6]] } |
| 59 |
sub format_A { $DoW[$_[0]->[6]] } |
| 60 |
sub format_b { $MoYs[$_[0]->[4]] } |
| 61 |
sub format_B { $MoY[$_[0]->[4]] } |
| 62 |
sub format_h { $MoYs[$_[0]->[4]] } |
| 63 |
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] } |
| 64 |
|
| 65 |
sub format_o { sprintf("%2d%s",$_[0]->[3],"\xc8\xd5") } # 日 |
| 66 |
|
| 67 |
1; |
| 68 |
|
| 69 |
__END__ |
| 70 |
|
| 71 |
=pod |
| 72 |
|
| 73 |
=encoding UTF-8 |
| 74 |
|
| 75 |
=head1 NAME |
| 76 |
|
| 77 |
Date::Language::Chinese_GB - Chinese localization for Date::Format (GB2312) |
| 78 |
|
| 79 |
=head1 VERSION |
| 80 |
|
| 81 |
version 2.35 |
| 82 |
|
| 83 |
=head1 AUTHOR |
| 84 |
|
| 85 |
Graham <[email protected]> |
| 86 |
|
| 87 |
=head1 COPYRIGHT AND LICENSE |
| 88 |
|
| 89 |
This software is copyright (c) 2020 by Graham Barr. |
| 90 |
|
| 91 |
This is free software; you can redistribute it and/or modify it under |
| 92 |
the same terms as the Perl 5 programming language system itself. |
| 93 |
|
| 94 |
=cut |