File Coverage

blib/lib/Locale/CLDR/Locales/Ar/Any/Ae.pm
Criterion Covered Total %
statement 23 23 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod n/a
total 31 31 100.0


line stmt bran cond sub pod time code
1             =head1
2              
3             Locale::CLDR::Locales::Ar::Any::Ae - Package for language Arabic
4              
5             =cut
6              
7             package Locale::CLDR::Locales::Ar::Any::Ae;
8             # This file auto generated from Data\common\main\ar_AE.xml
9             # on Sun 24 Apr 8:14:48 am GMT
10              
11 1     1   819 use version;
  1         2  
  1         7  
12              
13             our $VERSION = version->declare('v0.29.0');
14              
15 1     1   111 use v5.10.1;
  1         3  
16 1     1   5 use mro 'c3';
  1         1  
  1         6  
17 1     1   52 use utf8;
  1         2  
  1         6  
18 1     1   41 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         1  
  1         13  
19              
20 1     1   119 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         1  
  1         8  
21 1     1   1154 use Moo;
  1         2  
  1         8  
22              
23             extends('Locale::CLDR::Locales::Ar::Any');
24             has 'display_name_region' => (
25             is => 'ro',
26             isa => HashRef[Str],
27             init_arg => undef,
28             default => sub {
29             {
30             'CI@alt=variant' => 'ساحل العاج',
31             'TL@alt=variant' => 'التيمور الشرقية',
32              
33             }
34             },
35             );
36              
37             has 'currencies' => (
38             is => 'ro',
39             isa => HashRef,
40             init_arg => undef,
41             default => sub { {
42             'BND' => {
43             symbol => '$',
44             },
45             } },
46             );
47              
48              
49             has 'day_period_data' => (
50             is => 'ro',
51             isa => CodeRef,
52             init_arg => undef,
53             default => sub { sub {
54             # Time in hhmm format
55             my ($self, $type, $time, $day_period_type) = @_;
56             $day_period_type //= 'default';
57             SWITCH:
58             for ($type) {
59             if ($_ eq 'gregorian') {
60             if($day_period_type eq 'selection') {
61             return 'night1' if $time >= 0
62             && $time < 100;
63             return 'morning2' if $time >= 600
64             && $time < 1200;
65             return 'afternoon1' if $time >= 1200
66             && $time < 1300;
67             return 'afternoon2' if $time >= 1300
68             && $time < 1800;
69             return 'morning1' if $time >= 300
70             && $time < 600;
71             return 'night2' if $time >= 100
72             && $time < 300;
73             return 'evening1' if $time >= 1800
74             && $time < 2400;
75             }
76             if($day_period_type eq 'default') {
77             return 'evening1' if $time >= 1800
78             && $time < 2400;
79             return 'night2' if $time >= 100
80             && $time < 300;
81             return 'night1' if $time >= 0
82             && $time < 100;
83             return 'morning2' if $time >= 600
84             && $time < 1200;
85             return 'afternoon1' if $time >= 1200
86             && $time < 1300;
87             return 'afternoon2' if $time >= 1300
88             && $time < 1800;
89             return 'morning1' if $time >= 300
90             && $time < 600;
91             }
92             last SWITCH;
93             }
94             }
95             } },
96             );
97              
98             around day_period_data => sub {
99             my ($orig, $self) = @_;
100             return $self->$orig;
101             };
102              
103             has 'eras' => (
104             is => 'ro',
105             isa => HashRef,
106             init_arg => undef,
107             default => sub { {
108             'gregorian' => {
109             },
110             } },
111             );
112              
113             has 'date_formats' => (
114             is => 'ro',
115             isa => HashRef,
116             init_arg => undef,
117             default => sub { {
118             'gregorian' => {
119             },
120             } },
121             );
122              
123             has 'time_formats' => (
124             is => 'ro',
125             isa => HashRef,
126             init_arg => undef,
127             default => sub { {
128             'gregorian' => {
129             },
130             } },
131             );
132              
133             has 'datetime_formats' => (
134             is => 'ro',
135             isa => HashRef,
136             init_arg => undef,
137             default => sub { {
138             'gregorian' => {
139             },
140             } },
141             );
142              
143             has 'datetime_formats_available_formats' => (
144             is => 'ro',
145             isa => HashRef,
146             init_arg => undef,
147             default => sub { {
148             } },
149             );
150              
151             has 'datetime_formats_append_item' => (
152             is => 'ro',
153             isa => HashRef,
154             init_arg => undef,
155             default => sub { {
156             } },
157             );
158              
159             has 'datetime_formats_interval' => (
160             is => 'ro',
161             isa => HashRef,
162             init_arg => undef,
163             default => sub { {
164             } },
165             );
166              
167 1     1   2718 no Moo;
  1         2  
  1         4  
168              
169             1;
170              
171             # vim: tabstop=4