File Coverage

blib/lib/Locale/CLDR/Locales/Fr/Any/Cm.pm
Criterion Covered Total %
statement 29 29 100.0
branch n/a
condition n/a
subroutine 10 10 100.0
pod n/a
total 39 39 100.0


line stmt bran cond sub pod time code
1             =encoding utf8
2              
3             =head1
4              
5             Locale::CLDR::Locales::Fr::Any::Cm - Package for language French
6              
7             =cut
8              
9             # This file auto generated from Data/common/main/fr_CM.xml
10             # on Mon 11 Apr 5:28:38 pm GMT
11              
12             use strict;
13 1     1   793 use warnings;
  1         2  
  1         21  
14 1     1   4 use version;
  1         2  
  1         16  
15 1     1   3  
  1         2  
  1         4  
16             our $VERSION = version->declare('v0.34.1');
17              
18             use v5.10.1;
19 1     1   83 use mro 'c3';
  1         3  
20 1     1   4 use utf8;
  1         1  
  1         4  
21 1     1   27 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         1  
  1         4  
22 1     1   24 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         1  
  1         9  
23 1     1   81 use Moo;
  1         2  
  1         5  
24 1     1   767  
  1         2  
  1         4  
25             extends('Locale::CLDR::Locales::Fr::Any');
26             has 'day_period_data' => (
27             is => 'ro',
28             isa => CodeRef,
29             init_arg => undef,
30             default => sub { sub {
31             # Time in hhmm format
32             my ($self, $type, $time, $day_period_type) = @_;
33             $day_period_type //= 'default';
34             SWITCH:
35             for ($type) {
36             if ($_ eq 'gregorian') {
37             if($day_period_type eq 'default') {
38             return 'midnight' if $time == 0;
39             return 'noon' if $time == 1200;
40             return 'afternoon1' if $time >= 1200
41             && $time < 1800;
42             return 'evening1' if $time >= 1800
43             && $time < 2400;
44             return 'morning1' if $time >= 400
45             && $time < 1200;
46             return 'night1' if $time >= 0
47             && $time < 400;
48             }
49             if($day_period_type eq 'selection') {
50             return 'afternoon1' if $time >= 1200
51             && $time < 1800;
52             return 'evening1' if $time >= 1800
53             && $time < 2400;
54             return 'morning1' if $time >= 400
55             && $time < 1200;
56             return 'night1' if $time >= 0
57             && $time < 400;
58             }
59             last SWITCH;
60             }
61             }
62             } },
63             );
64              
65             around day_period_data => sub {
66             my ($orig, $self) = @_;
67             return $self->$orig;
68             };
69              
70             has 'day_periods' => (
71             is => 'ro',
72             isa => HashRef,
73             init_arg => undef,
74             default => sub { {
75             'gregorian' => {
76             'format' => {
77             'abbreviated' => {
78             'am' => q{mat.},
79             'pm' => q{soir},
80             },
81             'narrow' => {
82             'am' => q{mat.},
83             'pm' => q{soir},
84             },
85             'wide' => {
86             'am' => q{matin},
87             'pm' => q{soir},
88             },
89             },
90             'stand-alone' => {
91             'abbreviated' => {
92             'am' => q{mat.},
93             'pm' => q{soir},
94             },
95             'narrow' => {
96             'am' => q{mat.},
97             'pm' => q{soir},
98             },
99             'wide' => {
100             'am' => q{matin},
101             'pm' => q{soir},
102             },
103             },
104             },
105             } },
106             );
107              
108             has 'eras' => (
109             is => 'ro',
110             isa => HashRef,
111             init_arg => undef,
112             default => sub { {
113             'gregorian' => {
114             },
115             } },
116             );
117              
118             has 'date_formats' => (
119             is => 'ro',
120             isa => HashRef,
121             init_arg => undef,
122             default => sub { {
123             'gregorian' => {
124             },
125             } },
126             );
127              
128             has 'time_formats' => (
129             is => 'ro',
130             isa => HashRef,
131             init_arg => undef,
132             default => sub { {
133             'gregorian' => {
134             },
135             } },
136             );
137              
138             has 'datetime_formats' => (
139             is => 'ro',
140             isa => HashRef,
141             init_arg => undef,
142             default => sub { {
143             'gregorian' => {
144             },
145             } },
146             );
147              
148             has 'datetime_formats_available_formats' => (
149             is => 'ro',
150             isa => HashRef,
151             init_arg => undef,
152             default => sub { {
153             'gregorian' => {
154             Ehm => q{E h:mm},
155             Ehms => q{E h:mm:ss},
156             h => q{h},
157             hm => q{h:mm},
158             hms => q{h:mm:ss},
159             hmsv => q{h:mm:ss v},
160             hmv => q{h:mm v},
161             },
162             } },
163             );
164              
165             has 'datetime_formats_append_item' => (
166             is => 'ro',
167             isa => HashRef,
168             init_arg => undef,
169             default => sub { {
170             } },
171             );
172              
173             has 'datetime_formats_interval' => (
174             is => 'ro',
175             isa => HashRef,
176             init_arg => undef,
177             default => sub { {
178             'gregorian' => {
179             h => {
180             a => q{h – h},
181             h => q{h – h},
182             },
183             hm => {
184             a => q{h:mm – h:mm},
185             h => q{h:mm – h:mm},
186             m => q{h:mm – h:mm},
187             },
188             hmv => {
189             a => q{h:mm – h:mm v},
190             h => q{h:mm – h:mm v},
191             m => q{h:mm – h:mm v},
192             },
193             hv => {
194             a => q{h – h v},
195             h => q{h – h v},
196             },
197             },
198             } },
199             );
200              
201             no Moo;
202 1     1   837  
  1         1  
  1         3  
203             1;
204              
205             # vim: tabstop=4