File Coverage

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