File Coverage

blib/lib/Locale/CLDR/Locales/Fr/Latn/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::Fr::Latn::Ma - Package for language French
6              
7             =cut
8              
9             package Locale::CLDR::Locales::Fr::Latn::Ma;
10             # This file auto generated from Data\common\main\fr_MA.xml
11             # on Fri 17 Jan 12:03:31 pm GMT
12              
13 1     1   2188 use strict;
  1         3  
  1         77  
14 1     1   7 use warnings;
  1         3  
  1         56  
15 1     1   7 use version;
  1         3  
  1         7  
16              
17             our $VERSION = version->declare('v0.46.0');
18              
19 1     1   143 use v5.12.0;
  1         4  
20 1     1   19 use mro 'c3';
  1         3  
  1         9  
21 1     1   41 use utf8;
  1         2  
  1         9  
22 1     1   51 use feature 'unicode_strings';
  1         2  
  1         156  
23 1     1   7 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         9  
24 1     1   2903 use Moo;
  1         3  
  1         8  
25              
26             extends('Locale::CLDR::Locales::Fr::Latn');
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   206 );
  1         2  
  1         122  
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             },
85             } },
86             );
87              
88             has 'day_period_data' => (
89             is => 'ro',
90             isa => CodeRef,
91             init_arg => undef,
92             default => sub { sub {
93             # Time in hhmm format
94             my ($self, $type, $time, $day_period_type) = @_;
95             $day_period_type //= 'default';
96             SWITCH:
97             for ($type) {
98             if ($_ eq 'gregorian') {
99             if($day_period_type eq 'default') {
100             return 'midnight' if $time == 0;
101             return 'noon' if $time == 1200;
102             return 'afternoon1' if $time >= 1200
103             && $time < 1800;
104             return 'evening1' if $time >= 1800
105             && $time < 2400;
106             return 'morning1' if $time >= 400
107             && $time < 1200;
108             return 'night1' if $time >= 0
109             && $time < 400;
110             }
111             if($day_period_type eq 'selection') {
112             return 'afternoon1' if $time >= 1200
113             && $time < 1800;
114             return 'evening1' if $time >= 1800
115             && $time < 2400;
116             return 'morning1' if $time >= 400
117             && $time < 1200;
118             return 'night1' if $time >= 0
119             && $time < 400;
120             }
121             last SWITCH;
122             }
123             }
124             } },
125             );
126              
127             around day_period_data => sub {
128             my ($orig, $self) = @_;
129             return $self->$orig;
130             };
131              
132             has 'day_periods' => (
133             is => 'ro',
134             isa => HashRef,
135             init_arg => undef,
136             default => sub { {
137             'gregorian' => {
138             'format' => {
139             'wide' => {
140             'am' => q{a.m.},
141             'pm' => q{p.m.},
142             },
143             },
144             },
145             } },
146             );
147              
148             has 'eras' => (
149             is => 'ro',
150             isa => HashRef,
151             init_arg => undef,
152             default => sub { {
153             'gregorian' => {
154             },
155             } },
156             );
157              
158             has 'date_formats' => (
159             is => 'ro',
160             isa => HashRef,
161             init_arg => undef,
162             default => sub { {
163             'gregorian' => {
164             },
165             } },
166             );
167              
168             has 'time_formats' => (
169             is => 'ro',
170             isa => HashRef,
171             init_arg => undef,
172             default => sub { {
173             'gregorian' => {
174             },
175             } },
176             );
177              
178             has 'datetime_formats' => (
179             is => 'ro',
180             isa => HashRef,
181             init_arg => undef,
182             default => sub { {
183             'gregorian' => {
184             },
185             } },
186             );
187              
188             has 'datetime_formats_available_formats' => (
189             is => 'ro',
190             isa => HashRef,
191             init_arg => undef,
192             default => sub { {
193             } },
194             );
195              
196             has 'datetime_formats_append_item' => (
197             is => 'ro',
198             isa => HashRef,
199             init_arg => undef,
200             default => sub { {
201             } },
202             );
203              
204             has 'datetime_formats_interval' => (
205             is => 'ro',
206             isa => HashRef,
207             init_arg => undef,
208             default => sub { {
209             } },
210             );
211              
212 1     1   1813 no Moo;
  1         4  
  1         6  
213              
214             1;
215              
216             # vim: tabstop=4