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