File Coverage

blib/lib/Locale/CLDR/Locales/En/Any/Mt.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 NAME
4              
5             Locale::CLDR::Locales::En::Any::Mt - Package for language English
6              
7             =cut
8              
9             package Locale::CLDR::Locales::En::Any::Mt;
10             # This file auto generated from Data\common\main\en_MT.xml
11             # on Fri 13 Oct 9:13:25 am GMT
12              
13 1     1   882 use strict;
  1         2  
  1         25  
14 1     1   4 use warnings;
  1         2  
  1         21  
15 1     1   3 use version;
  1         2  
  1         5  
16              
17             our $VERSION = version->declare('v0.34.2');
18              
19 1     1   83 use v5.10.1;
  1         3  
20 1     1   4 use mro 'c3';
  1         2  
  1         5  
21 1     1   34 use utf8;
  1         2  
  1         5  
22 1     1   38 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         2  
  1         10  
23 1     1   100 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         6  
24 1     1   901 use Moo;
  1         2  
  1         5  
25              
26             extends('Locale::CLDR::Locales::En::Any::001');
27             has 'currencies' => (
28             is => 'ro',
29             isa => HashRef,
30             init_arg => undef,
31             default => sub { {
32             'GBP' => {
33             symbol => 'GB£',
34             },
35             } },
36             );
37              
38              
39             has 'day_period_data' => (
40             is => 'ro',
41             isa => CodeRef,
42             init_arg => undef,
43             default => sub { sub {
44             # Time in hhmm format
45             my ($self, $type, $time, $day_period_type) = @_;
46             $day_period_type //= 'default';
47             SWITCH:
48             for ($type) {
49             if ($_ eq 'generic') {
50             if($day_period_type eq 'default') {
51             return 'midnight' if $time == 0;
52             return 'noon' if $time == 1200;
53             return 'afternoon1' if $time >= 1200
54             && $time < 1800;
55             return 'evening1' if $time >= 1800
56             && $time < 2100;
57             return 'morning1' if $time >= 600
58             && $time < 1200;
59             return 'night1' if $time >= 2100;
60             return 'night1' if $time < 600;
61             }
62             if($day_period_type eq 'selection') {
63             return 'afternoon1' if $time >= 1200
64             && $time < 1800;
65             return 'evening1' if $time >= 1800
66             && $time < 2100;
67             return 'morning1' if $time >= 600
68             && $time < 1200;
69             return 'night1' if $time >= 2100;
70             return 'night1' if $time < 600;
71             }
72             last SWITCH;
73             }
74             if ($_ eq 'gregorian') {
75             if($day_period_type eq 'default') {
76             return 'midnight' if $time == 0;
77             return 'noon' if $time == 1200;
78             return 'afternoon1' if $time >= 1200
79             && $time < 1800;
80             return 'evening1' if $time >= 1800
81             && $time < 2100;
82             return 'morning1' if $time >= 600
83             && $time < 1200;
84             return 'night1' if $time >= 2100;
85             return 'night1' if $time < 600;
86             }
87             if($day_period_type eq 'selection') {
88             return 'afternoon1' if $time >= 1200
89             && $time < 1800;
90             return 'evening1' if $time >= 1800
91             && $time < 2100;
92             return 'morning1' if $time >= 600
93             && $time < 1200;
94             return 'night1' if $time >= 2100;
95             return 'night1' if $time < 600;
96             }
97             last SWITCH;
98             }
99             }
100             } },
101             );
102              
103             around day_period_data => sub {
104             my ($orig, $self) = @_;
105             return $self->$orig;
106             };
107              
108             has 'eras' => (
109             is => 'ro',
110             isa => HashRef,
111             init_arg => undef,
112             default => sub { {
113             'generic' => {
114             },
115             'gregorian' => {
116             },
117             } },
118             );
119              
120             has 'date_formats' => (
121             is => 'ro',
122             isa => HashRef,
123             init_arg => undef,
124             default => sub { {
125             'generic' => {
126             'long' => q{dd MMMM y G},
127             'medium' => q{dd MMM y G},
128             },
129             'gregorian' => {
130             'long' => q{dd MMMM y},
131             'medium' => q{dd MMM y},
132             },
133             } },
134             );
135              
136             has 'time_formats' => (
137             is => 'ro',
138             isa => HashRef,
139             init_arg => undef,
140             default => sub { {
141             'generic' => {
142             },
143             'gregorian' => {
144             'full' => q{HH:mm:ss zzzz},
145             'long' => q{HH:mm:ss z},
146             'medium' => q{HH:mm:ss},
147             'short' => q{HH:mm},
148             },
149             } },
150             );
151              
152             has 'datetime_formats' => (
153             is => 'ro',
154             isa => HashRef,
155             init_arg => undef,
156             default => sub { {
157             'generic' => {
158             },
159             'gregorian' => {
160             },
161             } },
162             );
163              
164             has 'datetime_formats_available_formats' => (
165             is => 'ro',
166             isa => HashRef,
167             init_arg => undef,
168             default => sub { {
169             'generic' => {
170             MMMd => q{dd MMM},
171             yyyyMMMEd => q{E, dd MMM y G},
172             yyyyMMMd => q{dd MMM y G},
173             },
174             'gregorian' => {
175             MMMd => q{dd MMM},
176             yMMMEd => q{E, dd MMM y},
177             yMMMd => q{dd MMM y},
178             },
179             } },
180             );
181              
182             has 'datetime_formats_append_item' => (
183             is => 'ro',
184             isa => HashRef,
185             init_arg => undef,
186             default => sub { {
187             } },
188             );
189              
190             has 'datetime_formats_interval' => (
191             is => 'ro',
192             isa => HashRef,
193             init_arg => undef,
194             default => sub { {
195             'generic' => {
196             MEd => {
197             M => q{E, dd/MM – E, dd/MM},
198             d => q{E, dd/MM – E, dd/MM},
199             },
200             MMMEd => {
201             M => q{E, dd MMM – E, dd MMM},
202             d => q{E, dd – E, dd MMM},
203             },
204             MMMd => {
205             M => q{dd MMM – dd MMM},
206             d => q{dd – dd MMM},
207             },
208             yM => {
209             M => q{MM/y – MM/y G},
210             y => q{MM/y – MM/y G},
211             },
212             yMEd => {
213             M => q{E, dd/MM/y – E, dd/MM/y G},
214             d => q{E, dd/MM/y – E, dd/MM/y G},
215             y => q{E, dd/MM/y – E, dd/MM/y G},
216             },
217             yMMMd => {
218             M => q{dd MMM – dd MMM y G},
219             d => q{dd – dd MMM y G},
220             y => q{dd MMM y – dd MMM y G},
221             },
222             yMd => {
223             M => q{dd/MM/y – dd/MM/y G},
224             d => q{dd/MM/y – dd/MM/y G},
225             y => q{dd/MM/y – dd/MM/y G},
226             },
227             },
228             'gregorian' => {
229             MEd => {
230             M => q{E, dd/MM – E, dd/MM},
231             d => q{E, dd/MM – E, dd/MM},
232             },
233             MMMEd => {
234             M => q{E, dd MMM – E, dd MMM},
235             d => q{E, dd – E, dd MMM},
236             },
237             MMMd => {
238             M => q{dd MMM – dd MMM},
239             d => q{dd – dd MMM},
240             },
241             yMMMd => {
242             M => q{dd MMM – dd MMM y},
243             d => q{dd – dd MMM y},
244             y => q{dd MMM y – dd MMM y},
245             },
246             },
247             } },
248             );
249              
250 1     1   1081 no Moo;
  1         1  
  1         5  
251              
252             1;
253              
254             # vim: tabstop=4