File Coverage

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