File Coverage

blib/lib/Locale/CLDR/Locales/Ar/Arab/Ma.pm
Criterion Covered Total %
statement 32 32 100.0
branch n/a
condition n/a
subroutine 11 11 100.0
pod n/a
total 43 43 100.0


line stmt bran cond sub pod time code
1             =encoding utf8
2              
3             =head1 NAME
4              
5             Locale::CLDR::Locales::Ar::Arab::Ma - Package for language Arabic
6              
7             =cut
8              
9             package Locale::CLDR::Locales::Ar::Arab::Ma;
10             # This file auto generated from Data\common\main\ar_MA.xml
11             # on Fri 17 Jan 12:03:31 pm GMT
12              
13 1     1   1809 use strict;
  1         3  
  1         42  
14 1     1   4 use warnings;
  1         1  
  1         40  
15 1     1   3 use version;
  1         2  
  1         5  
16              
17             our $VERSION = version->declare('v0.46.0');
18              
19 1     1   89 use v5.12.0;
  1         3  
20 1     1   3 use mro 'c3';
  1         2  
  1         69  
21 1     1   49 use utf8;
  1         3  
  1         8  
22 1     1   80 use feature 'unicode_strings';
  1         2  
  1         221  
23 1     1   9 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         26  
24 1     1   3501 use Moo;
  1         2  
  1         8  
25              
26             extends('Locale::CLDR::Locales::Ar::Arab');
27             has 'characters' => (
28             is => 'ro',
29             isa => HashRef,
30             init_arg => undef,
31             default => $^V ge v5.18.0
32             ? eval <<'EOT'
33             sub {
34             no warnings 'experimental::regex_sets';
35             return {
36             auxiliary => qr{[‌‍‎‏ پ چ ژ ڜ ڢ ڤ ڥ ٯ ڧ ڨ ک ڭ گ ݣ ی]},
37             numbers => qr{[‎ \- ‑ , . % ‰ + 0 1 2 3 4 5 6 7 8 9]},
38             };
39             },
40             EOT
41             : sub {
42             return {};
43             },
44 1     1   157 );
  1         3  
  1         165  
45              
46              
47             has 'default_numbering_system' => (
48             is => 'ro',
49             isa => Str,
50             init_arg => undef,
51             default => 'latn',
52             );
53              
54             has 'number_symbols' => (
55             is => 'ro',
56             isa => HashRef,
57             init_arg => undef,
58             default => sub { {
59             'latn' => {
60             'decimal' => q(,),
61             'group' => q(.),
62             },
63             } }
64             );
65              
66             has 'calendar_months' => (
67             is => 'ro',
68             isa => HashRef,
69             init_arg => undef,
70             default => sub { {
71             'gregorian' => {
72             'format' => {
73             wide => {
74             nonleap => [
75             undef(),
76             undef(),
77             undef(),
78             'أبريل',
79             'ماي',
80             undef(),
81             'يوليوز',
82             'غشت',
83             'شتنبر',
84             undef(),
85             'نونبر',
86             'دجنبر'
87             ],
88             leap => [
89            
90             ],
91             },
92             },
93             'stand-alone' => {
94             narrow => {
95             nonleap => [
96             undef(),
97             undef(),
98             undef(),
99             'أ',
100             'م',
101             'ن',
102             'ل',
103             undef(),
104             'ش',
105             'ك',
106             'ب',
107             'د'
108             ],
109             leap => [
110            
111             ],
112             },
113             },
114             },
115             } },
116             );
117              
118             has 'day_period_data' => (
119             is => 'ro',
120             isa => CodeRef,
121             init_arg => undef,
122             default => sub { sub {
123             # Time in hhmm format
124             my ($self, $type, $time, $day_period_type) = @_;
125             $day_period_type //= 'default';
126             SWITCH:
127             for ($type) {
128             if ($_ eq 'gregorian') {
129             if($day_period_type eq 'default') {
130             return 'afternoon1' if $time >= 1200
131             && $time < 1300;
132             return 'afternoon2' if $time >= 1300
133             && $time < 1800;
134             return 'evening1' if $time >= 1800
135             && $time < 2400;
136             return 'morning1' if $time >= 300
137             && $time < 600;
138             return 'morning2' if $time >= 600
139             && $time < 1200;
140             return 'night1' if $time >= 0
141             && $time < 100;
142             return 'night2' if $time >= 100
143             && $time < 300;
144             }
145             if($day_period_type eq 'selection') {
146             return 'afternoon1' if $time >= 1200
147             && $time < 1300;
148             return 'afternoon2' if $time >= 1300
149             && $time < 1800;
150             return 'evening1' if $time >= 1800
151             && $time < 2400;
152             return 'morning1' if $time >= 300
153             && $time < 600;
154             return 'morning2' if $time >= 600
155             && $time < 1200;
156             return 'night1' if $time >= 0
157             && $time < 100;
158             return 'night2' if $time >= 100
159             && $time < 300;
160             }
161             last SWITCH;
162             }
163             }
164             } },
165             );
166              
167             around day_period_data => sub {
168             my ($orig, $self) = @_;
169             return $self->$orig;
170             };
171              
172             has 'eras' => (
173             is => 'ro',
174             isa => HashRef,
175             init_arg => undef,
176             default => sub { {
177             'gregorian' => {
178             },
179             } },
180             );
181              
182             has 'date_formats' => (
183             is => 'ro',
184             isa => HashRef,
185             init_arg => undef,
186             default => sub { {
187             'gregorian' => {
188             },
189             } },
190             );
191              
192             has 'time_formats' => (
193             is => 'ro',
194             isa => HashRef,
195             init_arg => undef,
196             default => sub { {
197             'gregorian' => {
198             'full' => q{HH:mm:ss zzzz},
199             'long' => q{HH:mm:ss z},
200             'medium' => q{HH:mm:ss},
201             'short' => q{HH:mm},
202             },
203             } },
204             );
205              
206             has 'datetime_formats' => (
207             is => 'ro',
208             isa => HashRef,
209             init_arg => undef,
210             default => sub { {
211             'gregorian' => {
212             },
213             } },
214             );
215              
216             has 'datetime_formats_available_formats' => (
217             is => 'ro',
218             isa => HashRef,
219             init_arg => undef,
220             default => sub { {
221             } },
222             );
223              
224             has 'datetime_formats_append_item' => (
225             is => 'ro',
226             isa => HashRef,
227             init_arg => undef,
228             default => sub { {
229             } },
230             );
231              
232             has 'datetime_formats_interval' => (
233             is => 'ro',
234             isa => HashRef,
235             init_arg => undef,
236             default => sub { {
237             } },
238             );
239              
240 1     1   2076 no Moo;
  1         3  
  1         7  
241              
242             1;
243              
244             # vim: tabstop=4