File Coverage

blib/lib/Locale/CLDR/Locales/Ar/Arab/Ps.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::Ar::Arab::Ps - Package for language Arabic
6              
7             =cut
8              
9             package Locale::CLDR::Locales::Ar::Arab::Ps;
10             # This file auto generated from Data\common\main\ar_PS.xml
11             # on Fri 17 Jan 12:03:31 pm GMT
12              
13 1     1   1684 use strict;
  1         3  
  1         39  
14 1     1   5 use warnings;
  1         3  
  1         47  
15 1     1   5 use version;
  1         2  
  1         8  
16              
17             our $VERSION = version->declare('v0.46.0');
18              
19 1     1   126 use v5.12.0;
  1         3  
20 1     1   6 use mro 'c3';
  1         2  
  1         7  
21 1     1   59 use utf8;
  1         2  
  1         8  
22 1     1   61 use feature 'unicode_strings';
  1         3  
  1         191  
23 1     1   7 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         36  
  1         10  
24 1     1   3067 use Moo;
  1         2  
  1         7  
25              
26             extends('Locale::CLDR::Locales::Ar::Arab');
27             has 'default_numbering_system' => (
28             is => 'ro',
29             isa => Str,
30             init_arg => undef,
31             default => 'arab',
32             );
33              
34             has 'calendar_months' => (
35             is => 'ro',
36             isa => HashRef,
37             init_arg => undef,
38             default => sub { {
39             'gregorian' => {
40             'format' => {
41             wide => {
42             nonleap => [
43             'كانون الثاني',
44             'شباط',
45             'آذار',
46             'نيسان',
47             'أيار',
48             'حزيران',
49             'تموز',
50             'آب',
51             'أيلول',
52             'تشرين الأول',
53             'تشرين الثاني',
54             'كانون الأول'
55             ],
56             leap => [
57            
58             ],
59             },
60             },
61             'stand-alone' => {
62             narrow => {
63             nonleap => [
64             'ك',
65             'ش',
66             'آ',
67             'ن',
68             'أ',
69             'ح',
70             'ت',
71             'آ',
72             'أ',
73             'ت',
74             'ت',
75             'ك'
76             ],
77             leap => [
78            
79             ],
80             },
81             },
82             },
83             } },
84             );
85              
86             has 'day_period_data' => (
87             is => 'ro',
88             isa => CodeRef,
89             init_arg => undef,
90             default => sub { sub {
91             # Time in hhmm format
92             my ($self, $type, $time, $day_period_type) = @_;
93             $day_period_type //= 'default';
94             SWITCH:
95             for ($type) {
96             if ($_ eq 'gregorian') {
97             if($day_period_type eq 'default') {
98             return 'afternoon1' if $time >= 1200
99             && $time < 1300;
100             return 'afternoon2' if $time >= 1300
101             && $time < 1800;
102             return 'evening1' if $time >= 1800
103             && $time < 2400;
104             return 'morning1' if $time >= 300
105             && $time < 600;
106             return 'morning2' if $time >= 600
107             && $time < 1200;
108             return 'night1' if $time >= 0
109             && $time < 100;
110             return 'night2' if $time >= 100
111             && $time < 300;
112             }
113             if($day_period_type eq 'selection') {
114             return 'afternoon1' if $time >= 1200
115             && $time < 1300;
116             return 'afternoon2' if $time >= 1300
117             && $time < 1800;
118             return 'evening1' if $time >= 1800
119             && $time < 2400;
120             return 'morning1' if $time >= 300
121             && $time < 600;
122             return 'morning2' if $time >= 600
123             && $time < 1200;
124             return 'night1' if $time >= 0
125             && $time < 100;
126             return 'night2' if $time >= 100
127             && $time < 300;
128             }
129             last SWITCH;
130             }
131             }
132             } },
133             );
134              
135             around day_period_data => sub {
136             my ($orig, $self) = @_;
137             return $self->$orig;
138             };
139              
140             has 'eras' => (
141             is => 'ro',
142             isa => HashRef,
143             init_arg => undef,
144             default => sub { {
145             'gregorian' => {
146             },
147             } },
148             );
149              
150             has 'date_formats' => (
151             is => 'ro',
152             isa => HashRef,
153             init_arg => undef,
154             default => sub { {
155             'gregorian' => {
156             },
157             } },
158             );
159              
160             has 'time_formats' => (
161             is => 'ro',
162             isa => HashRef,
163             init_arg => undef,
164             default => sub { {
165             'gregorian' => {
166             },
167             } },
168             );
169              
170             has 'datetime_formats' => (
171             is => 'ro',
172             isa => HashRef,
173             init_arg => undef,
174             default => sub { {
175             'gregorian' => {
176             },
177             } },
178             );
179              
180             has 'datetime_formats_available_formats' => (
181             is => 'ro',
182             isa => HashRef,
183             init_arg => undef,
184             default => sub { {
185             } },
186             );
187              
188             has 'datetime_formats_append_item' => (
189             is => 'ro',
190             isa => HashRef,
191             init_arg => undef,
192             default => sub { {
193             } },
194             );
195              
196             has 'datetime_formats_interval' => (
197             is => 'ro',
198             isa => HashRef,
199             init_arg => undef,
200             default => sub { {
201             } },
202             );
203              
204 1     1   1969 no Moo;
  1         3  
  1         6  
205              
206             1;
207              
208             # vim: tabstop=4