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 NAME
4              
5             Locale::CLDR::Locales::Fr::Any::Cd - Package for language French
6              
7             =cut
8              
9             package Locale::CLDR::Locales::Fr::Any::Cd;
10             # This file auto generated from Data\common\main\fr_CD.xml
11             # on Fri 13 Oct 9:16:57 am GMT
12              
13 1     1   1012 use strict;
  1         2  
  1         27  
14 1     1   5 use warnings;
  1         2  
  1         23  
15 1     1   5 use version;
  1         3  
  1         6  
16              
17             our $VERSION = version->declare('v0.34.2');
18              
19 1     1   88 use v5.10.1;
  1         4  
20 1     1   5 use mro 'c3';
  1         2  
  1         31  
21 1     1   41 use utf8;
  1         2  
  1         6  
22 1     1   40 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         2  
  1         14  
23 1     1   106 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         7  
24 1     1   929 use Moo;
  1         2  
  1         6  
25              
26             extends('Locale::CLDR::Locales::Fr::Any');
27             has 'currencies' => (
28             is => 'ro',
29             isa => HashRef,
30             init_arg => undef,
31             default => sub { {
32             'CDF' => {
33             symbol => 'FC',
34             },
35             } },
36             );
37              
38              
39             has 'day_period_data' => (
40             is => 'ro',
41             isa => CodeRef,
42             init_arg => undef,
43             default => sub { sub {
44             # Time in hhmm format
45             my ($self, $type, $time, $day_period_type) = @_;
46             $day_period_type //= 'default';
47             SWITCH:
48             for ($type) {
49             if ($_ eq 'gregorian') {
50             if($day_period_type eq 'default') {
51             return 'midnight' if $time == 0;
52             return 'noon' if $time == 1200;
53             return 'afternoon1' if $time >= 1200
54             && $time < 1800;
55             return 'evening1' if $time >= 1800
56             && $time < 2400;
57             return 'morning1' if $time >= 400
58             && $time < 1200;
59             return 'night1' if $time >= 0
60             && $time < 400;
61             }
62             if($day_period_type eq 'selection') {
63             return 'afternoon1' if $time >= 1200
64             && $time < 1800;
65             return 'evening1' if $time >= 1800
66             && $time < 2400;
67             return 'morning1' if $time >= 400
68             && $time < 1200;
69             return 'night1' if $time >= 0
70             && $time < 400;
71             }
72             last SWITCH;
73             }
74             }
75             } },
76             );
77              
78             around day_period_data => sub {
79             my ($orig, $self) = @_;
80             return $self->$orig;
81             };
82              
83             has 'day_periods' => (
84             is => 'ro',
85             isa => HashRef,
86             init_arg => undef,
87             default => sub { {
88             'gregorian' => {
89             'format' => {
90             'narrow' => {
91             'afternoon1' => q{ap.m.},
92             'evening1' => q{soir},
93             'midnight' => q{min.},
94             'morning1' => q{mat.},
95             'night1' => q{nuit},
96             'noon' => q{midi},
97             },
98             },
99             'stand-alone' => {
100             'narrow' => {
101             'midnight' => q{min.},
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             } },
154             );
155              
156             has 'datetime_formats_append_item' => (
157             is => 'ro',
158             isa => HashRef,
159             init_arg => undef,
160             default => sub { {
161             } },
162             );
163              
164             has 'datetime_formats_interval' => (
165             is => 'ro',
166             isa => HashRef,
167             init_arg => undef,
168             default => sub { {
169             'gregorian' => {
170             y => {
171             y => q{y – y},
172             },
173             },
174             } },
175             );
176              
177 1     1   914 no Moo;
  1         2  
  1         4  
178              
179             1;
180              
181             # vim: tabstop=4