File Coverage

blib/lib/Locale/CLDR/Locales/Zh/Hans/My.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::Zh::Hans::My - Package for language Chinese
6              
7             =cut
8              
9             package Locale::CLDR::Locales::Zh::Hans::My;
10             # This file auto generated from Data\common\main\zh_Hans_MY.xml
11             # on Fri 17 Jan 12:03:31 pm GMT
12              
13 1     1   1998 use strict;
  1         4  
  1         49  
14 1     1   7 use warnings;
  1         2  
  1         76  
15 1     1   7 use version;
  1         2  
  1         467  
16              
17             our $VERSION = version->declare('v0.46.0');
18              
19 1     1   167 use v5.12.0;
  1         4  
20 1     1   7 use mro 'c3';
  1         2  
  1         9  
21 1     1   44 use utf8;
  1         2  
  1         9  
22 1     1   55 use feature 'unicode_strings';
  1         1  
  1         258  
23 1     1   9 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         11  
24 1     1   3005 use Moo;
  1         2  
  1         9  
25              
26             extends('Locale::CLDR::Locales::Zh::Hans');
27             has 'currencies' => (
28             is => 'ro',
29             isa => HashRef,
30             init_arg => undef,
31             default => sub { {
32             'MYR' => {
33             display_name => {
34             'currency' => q(马来西亚令吉),
35             'other' => q(马来西亚令吉),
36             },
37             },
38             } },
39             );
40              
41              
42             has 'day_period_data' => (
43             is => 'ro',
44             isa => CodeRef,
45             init_arg => undef,
46             default => sub { sub {
47             # Time in hhmm format
48             my ($self, $type, $time, $day_period_type) = @_;
49             $day_period_type //= 'default';
50             SWITCH:
51             for ($type) {
52             if ($_ eq 'gregorian') {
53             if($day_period_type eq 'default') {
54             return 'midnight' if $time == 0;
55             return 'afternoon1' if $time >= 1200
56             && $time < 1300;
57             return 'afternoon2' if $time >= 1300
58             && $time < 1900;
59             return 'evening1' if $time >= 1900
60             && $time < 2400;
61             return 'morning1' if $time >= 500
62             && $time < 800;
63             return 'morning2' if $time >= 800
64             && $time < 1200;
65             return 'night1' if $time >= 0
66             && $time < 500;
67             }
68             if($day_period_type eq 'selection') {
69             return 'afternoon1' if $time >= 1200
70             && $time < 1300;
71             return 'afternoon2' if $time >= 1300
72             && $time < 1900;
73             return 'evening1' if $time >= 1900
74             && $time < 2400;
75             return 'morning1' if $time >= 500
76             && $time < 800;
77             return 'morning2' if $time >= 800
78             && $time < 1200;
79             return 'night1' if $time >= 0
80             && $time < 500;
81             }
82             last SWITCH;
83             }
84             }
85             } },
86             );
87              
88             around day_period_data => sub {
89             my ($orig, $self) = @_;
90             return $self->$orig;
91             };
92              
93             has 'day_periods' => (
94             is => 'ro',
95             isa => HashRef,
96             init_arg => undef,
97             default => sub { {
98             'gregorian' => {
99             'format' => {
100             'wide' => {
101             'morning1' => q{早上},
102             },
103             },
104             },
105             } },
106             );
107              
108             has 'eras' => (
109             is => 'ro',
110             isa => HashRef,
111             init_arg => undef,
112             default => sub { {
113             'gregorian' => {
114             },
115             } },
116             );
117              
118             has 'date_formats' => (
119             is => 'ro',
120             isa => HashRef,
121             init_arg => undef,
122             default => sub { {
123             'gregorian' => {
124             },
125             } },
126             );
127              
128             has 'time_formats' => (
129             is => 'ro',
130             isa => HashRef,
131             init_arg => undef,
132             default => sub { {
133             'gregorian' => {
134             'full' => q{zzzz ah:mm:ss},
135             'long' => q{z ah:mm:ss},
136             'medium' => q{ah:mm:ss},
137             'short' => q{ah:mm},
138             },
139             } },
140             );
141              
142             has 'datetime_formats' => (
143             is => 'ro',
144             isa => HashRef,
145             init_arg => undef,
146             default => sub { {
147             'gregorian' => {
148             },
149             } },
150             );
151              
152             has 'datetime_formats_available_formats' => (
153             is => 'ro',
154             isa => HashRef,
155             init_arg => undef,
156             default => sub { {
157             } },
158             );
159              
160             has 'datetime_formats_append_item' => (
161             is => 'ro',
162             isa => HashRef,
163             init_arg => undef,
164             default => sub { {
165             } },
166             );
167              
168             has 'datetime_formats_interval' => (
169             is => 'ro',
170             isa => HashRef,
171             init_arg => undef,
172             default => sub { {
173             } },
174             );
175              
176 1     1   1697 no Moo;
  1         3  
  1         7  
177              
178             1;
179              
180             # vim: tabstop=4