File Coverage

blib/lib/Locale/CLDR/Locales/Fr/Any/Td.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::Td - Package for language French
6              
7             =cut
8              
9             package Locale::CLDR::Locales::Fr::Any::Td;
10             # This file auto generated from Data\common\main\fr_TD.xml
11             # on Sun 16 Dec 4:16:43 pm GMT
12              
13 1     1   1072 use strict;
  1         2  
  1         40  
14 1     1   5 use warnings;
  1         2  
  1         23  
15 1     1   4 use version;
  1         1  
  1         6  
16              
17             our $VERSION = version->declare('v0.34.0');
18              
19 1     1   90 use v5.10.1;
  1         2  
20 1     1   7 use mro 'c3';
  1         3  
  1         6  
21 1     1   30 use utf8;
  1         3  
  1         7  
22 1     1   38 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         2  
  1         13  
23 1     1   99 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         6  
24 1     1   921 use Moo;
  1         3  
  1         6  
25              
26             extends('Locale::CLDR::Locales::Fr::Any');
27             has 'day_period_data' => (
28             is => 'ro',
29             isa => CodeRef,
30             init_arg => undef,
31             default => sub { sub {
32             # Time in hhmm format
33             my ($self, $type, $time, $day_period_type) = @_;
34             $day_period_type //= 'default';
35             SWITCH:
36             for ($type) {
37             if ($_ eq 'gregorian') {
38             if($day_period_type eq 'default') {
39             return 'noon' if $time == 1200;
40             return 'midnight' if $time == 0;
41             return 'night1' if $time >= 0
42             && $time < 400;
43             return 'evening1' if $time >= 1800
44             && $time < 2400;
45             return 'afternoon1' if $time >= 1200
46             && $time < 1800;
47             return 'morning1' if $time >= 400
48             && $time < 1200;
49             }
50             if($day_period_type eq 'selection') {
51             return 'morning1' if $time >= 400
52             && $time < 1200;
53             return 'afternoon1' if $time >= 1200
54             && $time < 1800;
55             return 'evening1' if $time >= 1800
56             && $time < 2400;
57             return 'night1' if $time >= 0
58             && $time < 400;
59             }
60             last SWITCH;
61             }
62             }
63             } },
64             );
65              
66             around day_period_data => sub {
67             my ($orig, $self) = @_;
68             return $self->$orig;
69             };
70              
71             has 'eras' => (
72             is => 'ro',
73             isa => HashRef,
74             init_arg => undef,
75             default => sub { {
76             'gregorian' => {
77             },
78             } },
79             );
80              
81             has 'date_formats' => (
82             is => 'ro',
83             isa => HashRef,
84             init_arg => undef,
85             default => sub { {
86             'gregorian' => {
87             },
88             } },
89             );
90              
91             has 'time_formats' => (
92             is => 'ro',
93             isa => HashRef,
94             init_arg => undef,
95             default => sub { {
96             'gregorian' => {
97             'full' => q{h:mm:ss a zzzz},
98             'long' => q{h:mm:ss a z},
99             'medium' => q{h:mm:ss a},
100             'short' => q{h:mm a},
101             },
102             } },
103             );
104              
105             has 'datetime_formats' => (
106             is => 'ro',
107             isa => HashRef,
108             init_arg => undef,
109             default => sub { {
110             'gregorian' => {
111             },
112             } },
113             );
114              
115             has 'datetime_formats_available_formats' => (
116             is => 'ro',
117             isa => HashRef,
118             init_arg => undef,
119             default => sub { {
120             } },
121             );
122              
123             has 'datetime_formats_append_item' => (
124             is => 'ro',
125             isa => HashRef,
126             init_arg => undef,
127             default => sub { {
128             } },
129             );
130              
131             has 'datetime_formats_interval' => (
132             is => 'ro',
133             isa => HashRef,
134             init_arg => undef,
135             default => sub { {
136             } },
137             );
138              
139 1     1   856 no Moo;
  1         3  
  1         17  
140              
141             1;
142              
143             # vim: tabstop=4