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             # This file auto generated from Data/common/main/fr_TD.xml
10             # on Mon 11 Apr 5:28:40 pm GMT
11              
12             use strict;
13 1     1   763 use warnings;
  1         2  
  1         22  
14 1     1   4 use version;
  1         2  
  1         17  
15 1     1   4  
  1         2  
  1         4  
16             our $VERSION = version->declare('v0.34.1');
17              
18             use v5.10.1;
19 1     1   99 use mro 'c3';
  1         2  
20 1     1   6 use utf8;
  1         1  
  1         4  
21 1     1   29 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         2  
  1         5  
22 1     1   25 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         1  
  1         17  
23 1     1   84 use Moo;
  1         2  
  1         5  
24 1     1   786  
  1         2  
  1         5  
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 'eras' => (
71             is => 'ro',
72             isa => HashRef,
73             init_arg => undef,
74             default => sub { {
75             'gregorian' => {
76             },
77             } },
78             );
79              
80             has 'date_formats' => (
81             is => 'ro',
82             isa => HashRef,
83             init_arg => undef,
84             default => sub { {
85             'gregorian' => {
86             },
87             } },
88             );
89              
90             has 'time_formats' => (
91             is => 'ro',
92             isa => HashRef,
93             init_arg => undef,
94             default => sub { {
95             'gregorian' => {
96             'full' => q{h:mm:ss a zzzz},
97             'long' => q{h:mm:ss a z},
98             'medium' => q{h:mm:ss a},
99             'short' => q{h:mm a},
100             },
101             } },
102             );
103              
104             has 'datetime_formats' => (
105             is => 'ro',
106             isa => HashRef,
107             init_arg => undef,
108             default => sub { {
109             'gregorian' => {
110             },
111             } },
112             );
113              
114             has 'datetime_formats_available_formats' => (
115             is => 'ro',
116             isa => HashRef,
117             init_arg => undef,
118             default => sub { {
119             } },
120             );
121              
122             has 'datetime_formats_append_item' => (
123             is => 'ro',
124             isa => HashRef,
125             init_arg => undef,
126             default => sub { {
127             } },
128             );
129              
130             has 'datetime_formats_interval' => (
131             is => 'ro',
132             isa => HashRef,
133             init_arg => undef,
134             default => sub { {
135             } },
136             );
137              
138             no Moo;
139 1     1   667  
  1         2  
  1         3  
140             1;
141              
142             # vim: tabstop=4