File Coverage

blib/lib/Locale/CLDR/Locales/Ar/Any/Ae.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::Ar::Any::Ae - Package for language Arabic
6              
7             =cut
8              
9             # This file auto generated from Data/common/main/ar_AE.xml
10             # on Mon 11 Apr 5:23:37 pm GMT
11              
12             use strict;
13 1     1   765 use warnings;
  1         1  
  1         23  
14 1     1   4 use version;
  1         1  
  1         18  
15 1     1   4  
  1         1  
  1         4  
16             our $VERSION = version->declare('v0.34.1');
17              
18             use v5.10.1;
19 1     1   74 use mro 'c3';
  1         3  
20 1     1   5 use utf8;
  1         2  
  1         5  
21 1     1   20 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         2  
  1         3  
22 1     1   31 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         9  
23 1     1   73 use Moo;
  1         2  
  1         5  
24 1     1   794  
  1         2  
  1         4  
25             extends('Locale::CLDR::Locales::Ar::Any');
26             has 'display_name_region' => (
27             is => 'ro',
28             isa => HashRef[Str],
29             init_arg => undef,
30             default => sub {
31             {
32             'CI@alt=variant' => 'ساحل العاج',
33             'TL@alt=variant' => 'التيمور الشرقية',
34              
35             }
36             },
37             );
38              
39             has 'default_numbering_system' => (
40             is => 'ro',
41             isa => Str,
42             init_arg => undef,
43             default => 'arab',
44             );
45              
46             has 'currencies' => (
47             is => 'ro',
48             isa => HashRef,
49             init_arg => undef,
50             default => sub { {
51             'BND' => {
52             symbol => '$',
53             },
54             } },
55             );
56              
57              
58             has 'day_period_data' => (
59             is => 'ro',
60             isa => CodeRef,
61             init_arg => undef,
62             default => sub { sub {
63             # Time in hhmm format
64             my ($self, $type, $time, $day_period_type) = @_;
65             $day_period_type //= 'default';
66             SWITCH:
67             for ($type) {
68             if ($_ eq 'gregorian') {
69             if($day_period_type eq 'default') {
70             return 'afternoon1' if $time >= 1200
71             && $time < 1300;
72             return 'afternoon2' if $time >= 1300
73             && $time < 1800;
74             return 'evening1' if $time >= 1800
75             && $time < 2400;
76             return 'morning1' if $time >= 300
77             && $time < 600;
78             return 'morning2' if $time >= 600
79             && $time < 1200;
80             return 'night1' if $time >= 0
81             && $time < 100;
82             return 'night2' if $time >= 100
83             && $time < 300;
84             }
85             if($day_period_type eq 'selection') {
86             return 'afternoon1' if $time >= 1200
87             && $time < 1300;
88             return 'afternoon2' if $time >= 1300
89             && $time < 1800;
90             return 'evening1' if $time >= 1800
91             && $time < 2400;
92             return 'morning1' if $time >= 300
93             && $time < 600;
94             return 'morning2' if $time >= 600
95             && $time < 1200;
96             return 'night1' if $time >= 0
97             && $time < 100;
98             return 'night2' if $time >= 100
99             && $time < 300;
100             }
101             last SWITCH;
102             }
103             }
104             } },
105             );
106              
107             around day_period_data => sub {
108             my ($orig, $self) = @_;
109             return $self->$orig;
110             };
111              
112             has 'eras' => (
113             is => 'ro',
114             isa => HashRef,
115             init_arg => undef,
116             default => sub { {
117             'gregorian' => {
118             },
119             } },
120             );
121              
122             has 'date_formats' => (
123             is => 'ro',
124             isa => HashRef,
125             init_arg => undef,
126             default => sub { {
127             'gregorian' => {
128             },
129             } },
130             );
131              
132             has 'time_formats' => (
133             is => 'ro',
134             isa => HashRef,
135             init_arg => undef,
136             default => sub { {
137             'gregorian' => {
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             no Moo;
177 1     1   785  
  1         2  
  1         3  
178             1;
179              
180             # vim: tabstop=4