File Coverage

blib/lib/Locale/CLDR/Locales/En/Any/Sg.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::Sg - Package for language English
6              
7             =cut
8              
9             package Locale::CLDR::Locales::En::Any::Sg;
10             # This file auto generated from Data\common\main\en_SG.xml
11             # on Sun 16 Dec 4:13:22 pm GMT
12              
13 1     1   1058 use strict;
  1         3  
  1         28  
14 1     1   4 use warnings;
  1         2  
  1         22  
15 1     1   4 use version;
  1         2  
  1         6  
16              
17             our $VERSION = version->declare('v0.34.0');
18              
19 1     1   89 use v5.10.1;
  1         4  
20 1     1   5 use mro 'c3';
  1         3  
  1         5  
21 1     1   22 use utf8;
  1         2  
  1         6  
22 1     1   38 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         2  
  1         37  
23 1     1   96 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         3  
  1         6  
24 1     1   921 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             'SGD' => {
33             symbol => '$',
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 'noon' if $time == 1200;
52             return 'midnight' if $time == 0;
53             return 'afternoon1' if $time >= 1200
54             && $time < 1800;
55             return 'morning1' if $time >= 600
56             && $time < 1200;
57             return 'evening1' if $time >= 1800
58             && $time < 2100;
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 'morning1' if $time >= 600
66             && $time < 1200;
67             return 'night1' if $time >= 2100;
68             return 'night1' if $time < 600;
69             return 'evening1' if $time >= 1800
70             && $time < 2100;
71             }
72             last SWITCH;
73             }
74             if ($_ eq 'gregorian') {
75             if($day_period_type eq 'default') {
76             return 'noon' if $time == 1200;
77             return 'midnight' if $time == 0;
78             return 'afternoon1' if $time >= 1200
79             && $time < 1800;
80             return 'morning1' if $time >= 600
81             && $time < 1200;
82             return 'evening1' if $time >= 1800
83             && $time < 2100;
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 'morning1' if $time >= 600
91             && $time < 1200;
92             return 'night1' if $time >= 2100;
93             return 'night1' if $time < 600;
94             return 'evening1' if $time >= 1800
95             && $time < 2100;
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             'short' => q{d/M/yy GGGGG},
127             },
128             'gregorian' => {
129             'short' => q{d/M/yy},
130             },
131             } },
132             );
133              
134             has 'time_formats' => (
135             is => 'ro',
136             isa => HashRef,
137             init_arg => undef,
138             default => sub { {
139             'generic' => {
140             },
141             'gregorian' => {
142             },
143             } },
144             );
145              
146             has 'datetime_formats' => (
147             is => 'ro',
148             isa => HashRef,
149             init_arg => undef,
150             default => sub { {
151             'generic' => {
152             },
153             'gregorian' => {
154             },
155             } },
156             );
157              
158             has 'datetime_formats_available_formats' => (
159             is => 'ro',
160             isa => HashRef,
161             init_arg => undef,
162             default => sub { {
163             'generic' => {
164             yyyyMEd => q{E, d/M/y GGGGG},
165             },
166             } },
167             );
168              
169             has 'datetime_formats_append_item' => (
170             is => 'ro',
171             isa => HashRef,
172             init_arg => undef,
173             default => sub { {
174             } },
175             );
176              
177             has 'datetime_formats_interval' => (
178             is => 'ro',
179             isa => HashRef,
180             init_arg => undef,
181             default => sub { {
182             'generic' => {
183             MEd => {
184             M => q{E, d/M – E, d/M},
185             d => q{E, d/M – E, d/M},
186             },
187             MMMEd => {
188             M => q{E, d MMM – E, d MMM},
189             d => q{E, d MMM – E, d MMM},
190             },
191             Md => {
192             M => q{d/M – d/M},
193             d => q{d/M – d/M},
194             },
195             yMEd => {
196             M => q{E, d/M/y – E, d/M/y G},
197             d => q{E, d/M/y – E, d/M/y G},
198             y => q{E, d/M/y – E, d/M/y G},
199             },
200             yMMMEd => {
201             d => q{E, d MMM – E, d MMM y G},
202             },
203             yMd => {
204             M => q{d/M/y – d/M/y G},
205             d => q{d/M/y – d/M/y G},
206             y => q{d/M/y – d/M/y G},
207             },
208             },
209             'gregorian' => {
210             MEd => {
211             M => q{E, d/M – E, d/M},
212             d => q{E, d/M – E, d/M},
213             },
214             MMMEd => {
215             M => q{E, d MMM – E, d MMM},
216             d => q{E, d MMM – E, d MMM},
217             },
218             Md => {
219             M => q{d/M – d/M},
220             d => q{d/M – d/M},
221             },
222             yMEd => {
223             M => q{E, d/M/y – E, d/M/y},
224             d => q{E, d/M/y – E, d/M/y},
225             y => q{E, d/M/y – E, d/M/y},
226             },
227             yMMMEd => {
228             d => q{E, d MMM – E, d MMM y},
229             },
230             yMd => {
231             M => q{d/M/y – d/M/y},
232             d => q{d/M/y – d/M/y},
233             y => q{d/M/y – d/M/y},
234             },
235             },
236             } },
237             );
238              
239             has 'time_zone_names' => (
240             is => 'ro',
241             isa => HashRef,
242             init_arg => undef,
243             default => sub { {
244             'Malaysia' => {
245             short => {
246             'standard' => q#MYT#,
247             },
248             },
249             'Singapore' => {
250             short => {
251             'standard' => q#SGT#,
252             },
253             },
254             } }
255             );
256 1     1   1101 no Moo;
  1         2  
  1         4  
257              
258             1;
259              
260             # vim: tabstop=4