File Coverage

blib/lib/Locale/CLDR/Locales/Fr/Any/Re.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::Re - Package for language French
6              
7             =cut
8              
9             package Locale::CLDR::Locales::Fr::Any::Re;
10             # This file auto generated from Data\common\main\fr_RE.xml
11             # on Sun 16 Dec 4:16:42 pm GMT
12              
13 1     1   834 use strict;
  1         3  
  1         24  
14 1     1   4 use warnings;
  1         3  
  1         20  
15 1     1   4 use version;
  1         2  
  1         4  
16              
17             our $VERSION = version->declare('v0.34.0');
18              
19 1     1   85 use v5.10.1;
  1         4  
20 1     1   5 use mro 'c3';
  1         2  
  1         5  
21 1     1   46 use utf8;
  1         3  
  1         12  
22 1     1   35 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         2  
  1         18  
23 1     1   83 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         9  
  1         6  
24 1     1   900 use Moo;
  1         2  
  1         4  
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 'day_periods' => (
72             is => 'ro',
73             isa => HashRef,
74             init_arg => undef,
75             default => sub { {
76             'gregorian' => {
77             'format' => {
78             'abbreviated' => {
79             'morning1' => q{mat.},
80             'afternoon1' => q{ap.m.},
81             'midnight' => q{min.},
82             'noon' => q{midi},
83             'night1' => q{nuit},
84             'evening1' => q{soir},
85             },
86             },
87             'stand-alone' => {
88             'abbreviated' => {
89             'midnight' => q{min.},
90             },
91             'narrow' => {
92             'midnight' => q{min.},
93             },
94             },
95             },
96             } },
97             );
98              
99             has 'eras' => (
100             is => 'ro',
101             isa => HashRef,
102             init_arg => undef,
103             default => sub { {
104             'gregorian' => {
105             },
106             } },
107             );
108              
109             has 'date_formats' => (
110             is => 'ro',
111             isa => HashRef,
112             init_arg => undef,
113             default => sub { {
114             'gregorian' => {
115             },
116             } },
117             );
118              
119             has 'time_formats' => (
120             is => 'ro',
121             isa => HashRef,
122             init_arg => undef,
123             default => sub { {
124             'gregorian' => {
125             },
126             } },
127             );
128              
129             has 'datetime_formats' => (
130             is => 'ro',
131             isa => HashRef,
132             init_arg => undef,
133             default => sub { {
134             'gregorian' => {
135             },
136             } },
137             );
138              
139             has 'datetime_formats_available_formats' => (
140             is => 'ro',
141             isa => HashRef,
142             init_arg => undef,
143             default => sub { {
144             } },
145             );
146              
147             has 'datetime_formats_append_item' => (
148             is => 'ro',
149             isa => HashRef,
150             init_arg => undef,
151             default => sub { {
152             } },
153             );
154              
155             has 'datetime_formats_interval' => (
156             is => 'ro',
157             isa => HashRef,
158             init_arg => undef,
159             default => sub { {
160             } },
161             );
162              
163 1     1   853 no Moo;
  1         2  
  1         3  
164              
165             1;
166              
167             # vim: tabstop=4