File Coverage

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