File Coverage

blib/lib/Locale/CLDR/Locales/En/Any/Sg.pm
Criterion Covered Total %
statement 23 23 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod n/a
total 31 31 100.0


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