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