File Coverage

blib/lib/Locale/CLDR/Locales/Ms/Any/Bn.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::Ms::Any::Bn - Package for language Malay
6              
7             =cut
8              
9             package Locale::CLDR::Locales::Ms::Any::Bn;
10             # This file auto generated from Data\common\main\ms_BN.xml
11             # on Fri 13 Oct 9:28:10 am GMT
12              
13 1     1   1121 use strict;
  1         2  
  1         28  
14 1     1   6 use warnings;
  1         2  
  1         26  
15 1     1   4 use version;
  1         2  
  1         12  
16              
17             our $VERSION = version->declare('v0.34.2');
18              
19 1     1   93 use v5.10.1;
  1         4  
20 1     1   5 use mro 'c3';
  1         2  
  1         7  
21 1     1   22 use utf8;
  1         2  
  1         6  
22 1     1   41 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         1  
  1         14  
23 1     1   109 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         9  
24 1     1   989 use Moo;
  1         2  
  1         7  
25              
26             extends('Locale::CLDR::Locales::Ms::Any');
27             has 'number_symbols' => (
28             is => 'ro',
29             isa => HashRef,
30             init_arg => undef,
31             default => sub { {
32             'latn' => {
33             'decimal' => q(,),
34             'group' => q(.),
35             },
36             } }
37             );
38              
39             has 'number_currency_formats' => (
40             is => 'ro',
41             isa => HashRef,
42             init_arg => undef,
43             default => sub { {
44             'latn' => {
45             'pattern' => {
46             'default' => {
47             'standard' => {
48             'positive' => '¤ #,##0.00',
49             },
50             },
51             },
52             },
53             } },
54             );
55              
56             has 'currencies' => (
57             is => 'ro',
58             isa => HashRef,
59             init_arg => undef,
60             default => sub { {
61             'BND' => {
62             symbol => '$',
63             },
64             } },
65             );
66              
67              
68             has 'day_period_data' => (
69             is => 'ro',
70             isa => CodeRef,
71             init_arg => undef,
72             default => sub { sub {
73             # Time in hhmm format
74             my ($self, $type, $time, $day_period_type) = @_;
75             $day_period_type //= 'default';
76             SWITCH:
77             for ($type) {
78             if ($_ eq 'generic') {
79             if($day_period_type eq 'default') {
80             return 'afternoon1' if $time >= 1200
81             && $time < 1400;
82             return 'evening1' if $time >= 1400
83             && $time < 1900;
84             return 'morning1' if $time >= 0
85             && $time < 100;
86             return 'morning2' if $time >= 100
87             && $time < 1200;
88             return 'night1' if $time >= 1900
89             && $time < 2400;
90             }
91             if($day_period_type eq 'selection') {
92             return 'afternoon1' if $time >= 1200
93             && $time < 1400;
94             return 'evening1' if $time >= 1400
95             && $time < 1900;
96             return 'morning1' if $time >= 0
97             && $time < 100;
98             return 'morning2' if $time >= 100
99             && $time < 1200;
100             return 'night1' if $time >= 1900
101             && $time < 2400;
102             }
103             last SWITCH;
104             }
105             if ($_ eq 'gregorian') {
106             if($day_period_type eq 'default') {
107             return 'afternoon1' if $time >= 1200
108             && $time < 1400;
109             return 'evening1' if $time >= 1400
110             && $time < 1900;
111             return 'morning1' if $time >= 0
112             && $time < 100;
113             return 'morning2' if $time >= 100
114             && $time < 1200;
115             return 'night1' if $time >= 1900
116             && $time < 2400;
117             }
118             if($day_period_type eq 'selection') {
119             return 'afternoon1' if $time >= 1200
120             && $time < 1400;
121             return 'evening1' if $time >= 1400
122             && $time < 1900;
123             return 'morning1' if $time >= 0
124             && $time < 100;
125             return 'morning2' if $time >= 100
126             && $time < 1200;
127             return 'night1' if $time >= 1900
128             && $time < 2400;
129             }
130             last SWITCH;
131             }
132             }
133             } },
134             );
135              
136             around day_period_data => sub {
137             my ($orig, $self) = @_;
138             return $self->$orig;
139             };
140              
141             has 'eras' => (
142             is => 'ro',
143             isa => HashRef,
144             init_arg => undef,
145             default => sub { {
146             'generic' => {
147             },
148             'gregorian' => {
149             },
150             } },
151             );
152              
153             has 'date_formats' => (
154             is => 'ro',
155             isa => HashRef,
156             init_arg => undef,
157             default => sub { {
158             'generic' => {
159             'full' => q{dd MMMM y G},
160             },
161             'gregorian' => {
162             'full' => q{dd MMMM y},
163             },
164             } },
165             );
166              
167             has 'time_formats' => (
168             is => 'ro',
169             isa => HashRef,
170             init_arg => undef,
171             default => sub { {
172             'generic' => {
173             },
174             'gregorian' => {
175             },
176             } },
177             );
178              
179             has 'datetime_formats' => (
180             is => 'ro',
181             isa => HashRef,
182             init_arg => undef,
183             default => sub { {
184             'generic' => {
185             },
186             'gregorian' => {
187             },
188             } },
189             );
190              
191             has 'datetime_formats_available_formats' => (
192             is => 'ro',
193             isa => HashRef,
194             init_arg => undef,
195             default => sub { {
196             } },
197             );
198              
199             has 'datetime_formats_append_item' => (
200             is => 'ro',
201             isa => HashRef,
202             init_arg => undef,
203             default => sub { {
204             } },
205             );
206              
207             has 'datetime_formats_interval' => (
208             is => 'ro',
209             isa => HashRef,
210             init_arg => undef,
211             default => sub { {
212             } },
213             );
214              
215 1     1   1055 no Moo;
  1         2  
  1         4  
216              
217             1;
218              
219             # vim: tabstop=4