File Coverage

blib/lib/Locale/CLDR/Locales/Fr/Any/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
4              
5             Locale::CLDR::Locales::Fr::Any::Ma - Package for language French
6              
7             =cut
8              
9             # This file auto generated from Data/common/main/fr_MA.xml
10             # on Mon 11 Apr 5:28:39 pm GMT
11              
12             use strict;
13 1     1   745 use warnings;
  1         2  
  1         21  
14 1     1   4 use version;
  1         1  
  1         16  
15 1     1   4  
  1         1  
  1         4  
16             our $VERSION = version->declare('v0.34.1');
17              
18             use v5.10.1;
19 1     1   73 use mro 'c3';
  1         10  
20 1     1   5 use utf8;
  1         2  
  1         4  
21 1     1   18 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         7  
  1         9  
22 1     1   27 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         1  
  1         9  
23 1     1   80 use Moo;
  1         7  
  1         6  
24 1     1   763  
  1         1  
  1         4  
25             extends('Locale::CLDR::Locales::Fr::Any');
26             has 'characters' => (
27             is => 'ro',
28             isa => HashRef,
29             init_arg => undef,
30             default => $^V ge v5.18.0
31             ? eval <<'EOT'
32             sub {
33             no warnings 'experimental::regex_sets';
34             return {
35             numbers => qr{[\- , . % ‰ + 0 1 2 3 4 5 6 7 8 9]},
36             };
37             },
38             EOT
39             : sub {
40             return {};
41             },
42             );
43 1     1   73  
  1         2  
  1         72  
44              
45             has 'number_symbols' => (
46             is => 'ro',
47             isa => HashRef,
48             init_arg => undef,
49             default => sub { {
50             'latn' => {
51             'group' => q(.),
52             },
53             } }
54             );
55              
56             has 'calendar_months' => (
57             is => 'ro',
58             isa => HashRef,
59             init_arg => undef,
60             default => sub { {
61             'gregorian' => {
62             'format' => {
63             abbreviated => {
64             nonleap => [
65             'jan.',
66             'fév.',
67             'mar.',
68             'avr.',
69             'mai',
70             'jui.',
71             'juil.',
72             'août',
73             'sept.',
74             'oct.',
75             'nov.',
76             'déc.'
77             ],
78             leap => [
79            
80             ],
81             },
82             },
83             'stand-alone' => {
84             abbreviated => {
85             nonleap => [
86             'jan.',
87             'fév.',
88             'mar.',
89             'avr.',
90             'mai',
91             'jui.',
92             'juil.',
93             'août',
94             'sept.',
95             'oct.',
96             'nov.',
97             'déc.'
98             ],
99             leap => [
100            
101             ],
102             },
103             },
104             },
105             } },
106             );
107              
108             has 'day_period_data' => (
109             is => 'ro',
110             isa => CodeRef,
111             init_arg => undef,
112             default => sub { sub {
113             # Time in hhmm format
114             my ($self, $type, $time, $day_period_type) = @_;
115             $day_period_type //= 'default';
116             SWITCH:
117             for ($type) {
118             if ($_ eq 'gregorian') {
119             if($day_period_type eq 'default') {
120             return 'midnight' if $time == 0;
121             return 'noon' if $time == 1200;
122             return 'afternoon1' if $time >= 1200
123             && $time < 1800;
124             return 'evening1' if $time >= 1800
125             && $time < 2400;
126             return 'morning1' if $time >= 400
127             && $time < 1200;
128             return 'night1' if $time >= 0
129             && $time < 400;
130             }
131             if($day_period_type eq 'selection') {
132             return 'afternoon1' if $time >= 1200
133             && $time < 1800;
134             return 'evening1' if $time >= 1800
135             && $time < 2400;
136             return 'morning1' if $time >= 400
137             && $time < 1200;
138             return 'night1' if $time >= 0
139             && $time < 400;
140             }
141             last SWITCH;
142             }
143             }
144             } },
145             );
146              
147             around day_period_data => sub {
148             my ($orig, $self) = @_;
149             return $self->$orig;
150             };
151              
152             has 'day_periods' => (
153             is => 'ro',
154             isa => HashRef,
155             init_arg => undef,
156             default => sub { {
157             'gregorian' => {
158             'format' => {
159             'wide' => {
160             'am' => q{a.m.},
161             'pm' => q{p.m.},
162             },
163             },
164             },
165             } },
166             );
167              
168             has 'eras' => (
169             is => 'ro',
170             isa => HashRef,
171             init_arg => undef,
172             default => sub { {
173             'gregorian' => {
174             },
175             } },
176             );
177              
178             has 'date_formats' => (
179             is => 'ro',
180             isa => HashRef,
181             init_arg => undef,
182             default => sub { {
183             'gregorian' => {
184             },
185             } },
186             );
187              
188             has 'time_formats' => (
189             is => 'ro',
190             isa => HashRef,
191             init_arg => undef,
192             default => sub { {
193             'gregorian' => {
194             },
195             } },
196             );
197              
198             has 'datetime_formats' => (
199             is => 'ro',
200             isa => HashRef,
201             init_arg => undef,
202             default => sub { {
203             'gregorian' => {
204             },
205             } },
206             );
207              
208             has 'datetime_formats_available_formats' => (
209             is => 'ro',
210             isa => HashRef,
211             init_arg => undef,
212             default => sub { {
213             } },
214             );
215              
216             has 'datetime_formats_append_item' => (
217             is => 'ro',
218             isa => HashRef,
219             init_arg => undef,
220             default => sub { {
221             } },
222             );
223              
224             has 'datetime_formats_interval' => (
225             is => 'ro',
226             isa => HashRef,
227             init_arg => undef,
228             default => sub { {
229             } },
230             );
231              
232             no Moo;
233 1     1   876  
  1         2  
  1         4  
234             1;
235              
236             # vim: tabstop=4