File Coverage

blib/lib/Locale/CLDR/Locales/Ar/Arab/Lb.pm
Criterion Covered Total %
statement 32 32 100.0
branch n/a
condition n/a
subroutine 11 11 100.0
pod n/a
total 43 43 100.0


line stmt bran cond sub pod time code
1             =encoding utf8
2              
3             =head1 NAME
4              
5             Locale::CLDR::Locales::Ar::Arab::Lb - Package for language Arabic
6              
7             =cut
8              
9             package Locale::CLDR::Locales::Ar::Arab::Lb;
10             # This file auto generated from Data\common\main\ar_LB.xml
11             # on Fri 17 Jan 12:03:31 pm GMT
12              
13 1     1   1119 use strict;
  1         1  
  1         29  
14 1     1   4 use warnings;
  1         2  
  1         33  
15 1     1   4 use version;
  1         1  
  1         5  
16              
17             our $VERSION = version->declare('v0.46.0');
18              
19 1     1   84 use v5.12.0;
  1         3  
20 1     1   5 use mro 'c3';
  1         1  
  1         5  
21 1     1   43 use utf8;
  1         2  
  1         5  
22 1     1   50 use feature 'unicode_strings';
  1         2  
  1         89  
23 1     1   5 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         1  
  1         6  
24 1     1   1686 use Moo;
  1         2  
  1         5  
25              
26             extends('Locale::CLDR::Locales::Ar::Arab');
27             has 'characters' => (
28             is => 'ro',
29             isa => HashRef,
30             init_arg => undef,
31             default => $^V ge v5.18.0
32             ? eval <<'EOT'
33             sub {
34             no warnings 'experimental::regex_sets';
35             return {
36             numbers => qr{[‎ \- ‑ , . % ‰ + 0 1 2 3 4 5 6 7 8 9]},
37             };
38             },
39             EOT
40             : sub {
41             return {};
42             },
43 1     1   117 );
  1         2  
  1         87  
44              
45              
46             has 'default_numbering_system' => (
47             is => 'ro',
48             isa => Str,
49             init_arg => undef,
50             default => 'arab',
51             );
52              
53             has 'number_symbols' => (
54             is => 'ro',
55             isa => HashRef,
56             init_arg => undef,
57             default => sub { {
58             'latn' => {
59             'decimal' => q(,),
60             'group' => q(.),
61             },
62             } }
63             );
64              
65             has 'currencies' => (
66             is => 'ro',
67             isa => HashRef,
68             init_arg => undef,
69             default => sub { {
70             'SDG' => {
71             symbol => 'SDG',
72             },
73             } },
74             );
75              
76              
77             has 'calendar_months' => (
78             is => 'ro',
79             isa => HashRef,
80             init_arg => undef,
81             default => sub { {
82             'gregorian' => {
83             'format' => {
84             wide => {
85             nonleap => [
86             'كانون الثاني',
87             'شباط',
88             'آذار',
89             'نيسان',
90             'أيار',
91             'حزيران',
92             'تموز',
93             'آب',
94             'أيلول',
95             'تشرين الأول',
96             'تشرين الثاني',
97             'كانون الأول'
98             ],
99             leap => [
100            
101             ],
102             },
103             },
104             'stand-alone' => {
105             narrow => {
106             nonleap => [
107             'ك',
108             'ش',
109             'آ',
110             'ن',
111             'أ',
112             'ح',
113             'ت',
114             'آ',
115             'أ',
116             'ت',
117             'ت',
118             'ك'
119             ],
120             leap => [
121            
122             ],
123             },
124             },
125             },
126             } },
127             );
128              
129             has 'day_period_data' => (
130             is => 'ro',
131             isa => CodeRef,
132             init_arg => undef,
133             default => sub { sub {
134             # Time in hhmm format
135             my ($self, $type, $time, $day_period_type) = @_;
136             $day_period_type //= 'default';
137             SWITCH:
138             for ($type) {
139             if ($_ eq 'gregorian') {
140             if($day_period_type eq 'default') {
141             return 'afternoon1' if $time >= 1200
142             && $time < 1300;
143             return 'afternoon2' if $time >= 1300
144             && $time < 1800;
145             return 'evening1' if $time >= 1800
146             && $time < 2400;
147             return 'morning1' if $time >= 300
148             && $time < 600;
149             return 'morning2' if $time >= 600
150             && $time < 1200;
151             return 'night1' if $time >= 0
152             && $time < 100;
153             return 'night2' if $time >= 100
154             && $time < 300;
155             }
156             if($day_period_type eq 'selection') {
157             return 'afternoon1' if $time >= 1200
158             && $time < 1300;
159             return 'afternoon2' if $time >= 1300
160             && $time < 1800;
161             return 'evening1' if $time >= 1800
162             && $time < 2400;
163             return 'morning1' if $time >= 300
164             && $time < 600;
165             return 'morning2' if $time >= 600
166             && $time < 1200;
167             return 'night1' if $time >= 0
168             && $time < 100;
169             return 'night2' if $time >= 100
170             && $time < 300;
171             }
172             last SWITCH;
173             }
174             }
175             } },
176             );
177              
178             around day_period_data => sub {
179             my ($orig, $self) = @_;
180             return $self->$orig;
181             };
182              
183             has 'eras' => (
184             is => 'ro',
185             isa => HashRef,
186             init_arg => undef,
187             default => sub { {
188             'gregorian' => {
189             },
190             } },
191             );
192              
193             has 'date_formats' => (
194             is => 'ro',
195             isa => HashRef,
196             init_arg => undef,
197             default => sub { {
198             'gregorian' => {
199             },
200             } },
201             );
202              
203             has 'time_formats' => (
204             is => 'ro',
205             isa => HashRef,
206             init_arg => undef,
207             default => sub { {
208             'gregorian' => {
209             },
210             } },
211             );
212              
213             has 'datetime_formats' => (
214             is => 'ro',
215             isa => HashRef,
216             init_arg => undef,
217             default => sub { {
218             'gregorian' => {
219             },
220             } },
221             );
222              
223             has 'datetime_formats_available_formats' => (
224             is => 'ro',
225             isa => HashRef,
226             init_arg => undef,
227             default => sub { {
228             } },
229             );
230              
231             has 'datetime_formats_append_item' => (
232             is => 'ro',
233             isa => HashRef,
234             init_arg => undef,
235             default => sub { {
236             } },
237             );
238              
239             has 'datetime_formats_interval' => (
240             is => 'ro',
241             isa => HashRef,
242             init_arg => undef,
243             default => sub { {
244             } },
245             );
246              
247 1     1   1390 no Moo;
  1         3  
  1         5  
248              
249             1;
250              
251             # vim: tabstop=4