File Coverage

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