File Coverage

blib/lib/Locale/CLDR/Locales/Ar/Arab/Tn.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::Tn - Package for language Arabic
6              
7             =cut
8              
9             package Locale::CLDR::Locales::Ar::Arab::Tn;
10             # This file auto generated from Data\common\main\ar_TN.xml
11             # on Fri 17 Jan 12:03:31 pm GMT
12              
13 1     1   1127 use strict;
  1         2  
  1         30  
14 1     1   3 use warnings;
  1         2  
  1         34  
15 1     1   4 use version;
  1         1  
  1         5  
16              
17             our $VERSION = version->declare('v0.46.0');
18              
19 1     1   83 use v5.12.0;
  1         3  
20 1     1   3 use mro 'c3';
  1         2  
  1         4  
21 1     1   24 use utf8;
  1         2  
  1         5  
22 1     1   20 use feature 'unicode_strings';
  1         2  
  1         95  
23 1     1   4 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         7  
24 1     1   1800 use Moo;
  1         1  
  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   128 );
  1         3  
  1         105  
44              
45              
46             has 'default_numbering_system' => (
47             is => 'ro',
48             isa => Str,
49             init_arg => undef,
50             default => 'latn',
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 'calendar_months' => (
66             is => 'ro',
67             isa => HashRef,
68             init_arg => undef,
69             default => sub { {
70             'gregorian' => {
71             'format' => {
72             wide => {
73             nonleap => [
74             'جانفي',
75             'فيفري',
76             undef(),
77             'أفريل',
78             'ماي',
79             'جوان',
80             'جويلية',
81             'أوت'
82             ],
83             leap => [
84            
85             ],
86             },
87             },
88             'stand-alone' => {
89             narrow => {
90             nonleap => [
91             'ج',
92             undef(),
93             undef(),
94             undef(),
95             'م',
96             'ج',
97             'ج',
98             'أ',
99             undef(),
100             'أ',
101             'ن'
102             ],
103             leap => [
104            
105             ],
106             },
107             },
108             },
109             } },
110             );
111              
112             has 'day_period_data' => (
113             is => 'ro',
114             isa => CodeRef,
115             init_arg => undef,
116             default => sub { sub {
117             # Time in hhmm format
118             my ($self, $type, $time, $day_period_type) = @_;
119             $day_period_type //= 'default';
120             SWITCH:
121             for ($type) {
122             if ($_ eq 'gregorian') {
123             if($day_period_type eq 'default') {
124             return 'afternoon1' if $time >= 1200
125             && $time < 1300;
126             return 'afternoon2' if $time >= 1300
127             && $time < 1800;
128             return 'evening1' if $time >= 1800
129             && $time < 2400;
130             return 'morning1' if $time >= 300
131             && $time < 600;
132             return 'morning2' if $time >= 600
133             && $time < 1200;
134             return 'night1' if $time >= 0
135             && $time < 100;
136             return 'night2' if $time >= 100
137             && $time < 300;
138             }
139             if($day_period_type eq 'selection') {
140             return 'afternoon1' if $time >= 1200
141             && $time < 1300;
142             return 'afternoon2' if $time >= 1300
143             && $time < 1800;
144             return 'evening1' if $time >= 1800
145             && $time < 2400;
146             return 'morning1' if $time >= 300
147             && $time < 600;
148             return 'morning2' if $time >= 600
149             && $time < 1200;
150             return 'night1' if $time >= 0
151             && $time < 100;
152             return 'night2' if $time >= 100
153             && $time < 300;
154             }
155             last SWITCH;
156             }
157             }
158             } },
159             );
160              
161             around day_period_data => sub {
162             my ($orig, $self) = @_;
163             return $self->$orig;
164             };
165              
166             has 'eras' => (
167             is => 'ro',
168             isa => HashRef,
169             init_arg => undef,
170             default => sub { {
171             'gregorian' => {
172             },
173             } },
174             );
175              
176             has 'date_formats' => (
177             is => 'ro',
178             isa => HashRef,
179             init_arg => undef,
180             default => sub { {
181             'gregorian' => {
182             },
183             } },
184             );
185              
186             has 'time_formats' => (
187             is => 'ro',
188             isa => HashRef,
189             init_arg => undef,
190             default => sub { {
191             'gregorian' => {
192             },
193             } },
194             );
195              
196             has 'datetime_formats' => (
197             is => 'ro',
198             isa => HashRef,
199             init_arg => undef,
200             default => sub { {
201             'gregorian' => {
202             },
203             } },
204             );
205              
206             has 'datetime_formats_available_formats' => (
207             is => 'ro',
208             isa => HashRef,
209             init_arg => undef,
210             default => sub { {
211             } },
212             );
213              
214             has 'datetime_formats_append_item' => (
215             is => 'ro',
216             isa => HashRef,
217             init_arg => undef,
218             default => sub { {
219             } },
220             );
221              
222             has 'datetime_formats_interval' => (
223             is => 'ro',
224             isa => HashRef,
225             init_arg => undef,
226             default => sub { {
227             } },
228             );
229              
230 1     1   1149 no Moo;
  1         2  
  1         5  
231              
232             1;
233              
234             # vim: tabstop=4