File Coverage

blib/lib/Locale/CLDR/Locales/Fr/Any/Ht.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::Ht - Package for language French
6              
7             =cut
8              
9             # This file auto generated from Data/common/main/fr_HT.xml
10             # on Mon 11 Apr 5:28:39 pm GMT
11              
12             use strict;
13 1     1   757 use warnings;
  1         2  
  1         22  
14 1     1   3 use version;
  1         2  
  1         17  
15 1     1   4  
  1         1  
  1         4  
16             our $VERSION = version->declare('v0.34.1');
17              
18             use v5.10.1;
19 1     1   74 use mro 'c3';
  1         3  
20 1     1   4 use utf8;
  1         1  
  1         4  
21 1     1   18 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         1  
  1         4  
22 1     1   35 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         7  
  1         11  
23 1     1   74 use Moo;
  1         8  
  1         6  
24 1     1   809  
  1         2  
  1         4  
25             extends('Locale::CLDR::Locales::Fr::Any');
26             has 'units' => (
27             is => 'ro',
28             isa => HashRef[HashRef[HashRef[Str]]],
29             init_arg => undef,
30             default => sub { {
31             'long' => {
32             'cubic-centimeter' => {
33             'per' => q({0} pour chaque centimetre cube),
34             },
35             'cubic-meter' => {
36             'per' => q({0} pour chaque metre cube),
37             },
38             'hectare' => {
39             'name' => q(carreau),
40             'one' => q({0}carreau),
41             'other' => q({0}carreaux),
42             },
43             },
44             'narrow' => {
45             'gram' => {
46             'name' => q(gr.),
47             },
48             },
49             'short' => {
50             'carat' => {
51             'name' => q(kr),
52             'one' => q({0}kr),
53             'other' => q({0}kr),
54             },
55             'century' => {
56             'name' => q(sec),
57             },
58             'gram' => {
59             'one' => q({0}gr),
60             'other' => q({0}gr),
61             },
62             },
63             } }
64             );
65              
66             has 'currencies' => (
67             is => 'ro',
68             isa => HashRef,
69             init_arg => undef,
70             default => sub { {
71             'HTG' => {
72             symbol => 'G',
73             },
74             } },
75             );
76              
77              
78             has 'day_period_data' => (
79             is => 'ro',
80             isa => CodeRef,
81             init_arg => undef,
82             default => sub { sub {
83             # Time in hhmm format
84             my ($self, $type, $time, $day_period_type) = @_;
85             $day_period_type //= 'default';
86             SWITCH:
87             for ($type) {
88             if ($_ eq 'gregorian') {
89             if($day_period_type eq 'default') {
90             return 'midnight' if $time == 0;
91             return 'noon' if $time == 1200;
92             return 'afternoon1' if $time >= 1200
93             && $time < 1800;
94             return 'evening1' if $time >= 1800
95             && $time < 2400;
96             return 'morning1' if $time >= 400
97             && $time < 1200;
98             return 'night1' if $time >= 0
99             && $time < 400;
100             }
101             if($day_period_type eq 'selection') {
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             last SWITCH;
112             }
113             }
114             } },
115             );
116              
117             around day_period_data => sub {
118             my ($orig, $self) = @_;
119             return $self->$orig;
120             };
121              
122             has 'day_periods' => (
123             is => 'ro',
124             isa => HashRef,
125             init_arg => undef,
126             default => sub { {
127             'gregorian' => {
128             'format' => {
129             'wide' => {
130             'afternoon1' => q{de l’après-midi},
131             'evening1' => q{du soir},
132             'midnight' => q{minuit},
133             'morning1' => q{du matin},
134             'night1' => q{de la nuit},
135             'noon' => q{midi},
136             },
137             },
138             },
139             } },
140             );
141              
142             has 'eras' => (
143             is => 'ro',
144             isa => HashRef,
145             init_arg => undef,
146             default => sub { {
147             'gregorian' => {
148             },
149             } },
150             );
151              
152             has 'date_formats' => (
153             is => 'ro',
154             isa => HashRef,
155             init_arg => undef,
156             default => sub { {
157             'gregorian' => {
158             },
159             } },
160             );
161              
162             has 'time_formats' => (
163             is => 'ro',
164             isa => HashRef,
165             init_arg => undef,
166             default => sub { {
167             'gregorian' => {
168             },
169             } },
170             );
171              
172             has 'datetime_formats' => (
173             is => 'ro',
174             isa => HashRef,
175             init_arg => undef,
176             default => sub { {
177             'gregorian' => {
178             },
179             } },
180             );
181              
182             has 'datetime_formats_available_formats' => (
183             is => 'ro',
184             isa => HashRef,
185             init_arg => undef,
186             default => sub { {
187             } },
188             );
189              
190             has 'datetime_formats_append_item' => (
191             is => 'ro',
192             isa => HashRef,
193             init_arg => undef,
194             default => sub { {
195             } },
196             );
197              
198             has 'datetime_formats_interval' => (
199             is => 'ro',
200             isa => HashRef,
201             init_arg => undef,
202             default => sub { {
203             } },
204             );
205              
206             no Moo;
207 1     1   860  
  1         2  
  1         4  
208             1;
209              
210             # vim: tabstop=4