File Coverage

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