File Coverage

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