File Coverage

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