Debian Codegraph @

lib/Date/Language/Arabic.pm

raw
1 package Date::Language::Arabic;
2
3 use strict;
4 use warnings;
5 use utf8;
6 use Date::Language ();
7 use base 'Date::Language';
8
9 our $VERSION = '2.35'; # VERSION: generated
10 # ABSTRACT: Arabic localization for Date::Format
11
12 our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
13
14 @DoW = qw(الأحد الاثنين الثلاثاء الأربعاء الخميس الجمعة السبت);
15 @MoY = qw(يناير فبراير مسيرة أبريل مايو يونيو يوليو أغسطس سبتمبر أكتوبر نوفمبر ديسمبر);
16 @DoWs = map { substr($_,0,3) } @DoW;
17 @MoYs = map { substr($_,0,3) } @MoY;
18 $MoYs[6] = 'يوليو';
19 @AMPM = qw(صباحا مساءا);
20
21 @Dsuf = ((qw(er e e e e e e e e e)) x 3, 'er'); #To be amended
22
23 Date::Language::_build_lookups();
24
25 # Formatting routines
26
27 sub format_a { $DoWs[$_[0]->[6]] }
28 sub format_A { $DoW[$_[0]->[6]] }
29 sub format_b { $MoYs[$_[0]->[4]] }
30 sub format_B { $MoY[$_[0]->[4]] }
31 sub format_h { $MoYs[$_[0]->[4]] }
32 sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
33
34 1;
35
36 __END__
37
38 =pod
39
40 =encoding UTF-8
41
42 =head1 NAME
43
44 Date::Language::Arabic - Arabic localization for Date::Format
45
46 =head1 VERSION
47
48 version 2.35
49
50 =head1 AUTHOR
51
52 Graham <[email protected]>
53
54 =head1 COPYRIGHT AND LICENSE
55
56 This software is copyright (c) 2020 by Graham Barr.
57
58 This is free software; you can redistribute it and/or modify it under
59 the same terms as the Perl 5 programming language system itself.
60
61 =cut