File Coverage

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