File Coverage

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