File Coverage

blib/lib/Locale/CLDR/Locales/En/Any/Dk.pm
Criterion Covered Total %
statement 23 23 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod n/a
total 31 31 100.0


line stmt bran cond sub pod time code
1             =head1
2              
3             Locale::CLDR::Locales::En::Any::Dk - Package for language English
4              
5             =cut
6              
7             package Locale::CLDR::Locales::En::Any::Dk;
8             # This file auto generated from Data\common\main\en_DK.xml
9             # on Sun 24 Apr 8:24:38 am GMT
10              
11 1     1   789 use version;
  1         2  
  1         5  
12              
13             our $VERSION = version->declare('v0.29.0');
14              
15 1     1   79 use v5.10.1;
  1         3  
16 1     1   3 use mro 'c3';
  1         2  
  1         5  
17 1     1   28 use utf8;
  1         2  
  1         5  
18 1     1   25 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         1  
  1         10  
19              
20 1     1   87 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         5  
21 1     1   634 use Moo;
  1         2  
  1         4  
22              
23             extends('Locale::CLDR::Locales::En::Any::150');
24             has 'number_symbols' => (
25             is => 'ro',
26             isa => HashRef,
27             init_arg => undef,
28             default => sub { {
29             'latn' => {
30             'timeSeparator' => q(.),
31             },
32             } }
33             );
34              
35             has 'number_formats' => (
36             is => 'ro',
37             isa => HashRef,
38             init_arg => undef,
39             default => sub { {
40             percentFormat => {
41             'default' => {
42             'standard' => {
43             '' => '#,##0 %',
44             },
45             },
46             },
47             } },
48             );
49              
50             has 'currencies' => (
51             is => 'ro',
52             isa => HashRef,
53             init_arg => undef,
54             default => sub { {
55             'DKK' => {
56             symbol => 'kr.',
57             },
58             } },
59             );
60              
61              
62             has 'day_period_data' => (
63             is => 'ro',
64             isa => CodeRef,
65             init_arg => undef,
66             default => sub { sub {
67             # Time in hhmm format
68             my ($self, $type, $time, $day_period_type) = @_;
69             $day_period_type //= 'default';
70             SWITCH:
71             for ($type) {
72             if ($_ eq 'generic') {
73             if($day_period_type eq 'default') {
74             return 'noon' if $time == 1200;
75             return 'midnight' if $time == 0;
76             return 'evening1' if $time >= 1800
77             && $time < 2100;
78             return 'night1' if $time >= 2100;
79             return 'night1' if $time < 600;
80             return 'afternoon1' if $time >= 1200
81             && $time < 1800;
82             return 'morning1' if $time >= 600
83             && $time < 1200;
84             }
85             if($day_period_type eq 'selection') {
86             return 'afternoon1' if $time >= 1200
87             && $time < 1800;
88             return 'morning1' if $time >= 600
89             && $time < 1200;
90             return 'night1' if $time >= 2100;
91             return 'night1' if $time < 600;
92             return 'evening1' if $time >= 1800
93             && $time < 2100;
94             }
95             last SWITCH;
96             }
97             if ($_ eq 'gregorian') {
98             if($day_period_type eq 'default') {
99             return 'noon' if $time == 1200;
100             return 'midnight' if $time == 0;
101             return 'evening1' if $time >= 1800
102             && $time < 2100;
103             return 'night1' if $time >= 2100;
104             return 'night1' if $time < 600;
105             return 'afternoon1' if $time >= 1200
106             && $time < 1800;
107             return 'morning1' if $time >= 600
108             && $time < 1200;
109             }
110             if($day_period_type eq 'selection') {
111             return 'afternoon1' if $time >= 1200
112             && $time < 1800;
113             return 'morning1' if $time >= 600
114             && $time < 1200;
115             return 'night1' if $time >= 2100;
116             return 'night1' if $time < 600;
117             return 'evening1' if $time >= 1800
118             && $time < 2100;
119             }
120             last SWITCH;
121             }
122             }
123             } },
124             );
125              
126             around day_period_data => sub {
127             my ($orig, $self) = @_;
128             return $self->$orig;
129             };
130              
131             has 'eras' => (
132             is => 'ro',
133             isa => HashRef,
134             init_arg => undef,
135             default => sub { {
136             'generic' => {
137             },
138             'gregorian' => {
139             },
140             } },
141             );
142              
143             has 'date_formats' => (
144             is => 'ro',
145             isa => HashRef,
146             init_arg => undef,
147             default => sub { {
148             'generic' => {
149             },
150             'gregorian' => {
151             },
152             } },
153             );
154              
155             has 'time_formats' => (
156             is => 'ro',
157             isa => HashRef,
158             init_arg => undef,
159             default => sub { {
160             'generic' => {
161             },
162             'gregorian' => {
163             'full' => q{HH.mm.ss zzzz},
164             'long' => q{HH.mm.ss z},
165             'medium' => q{HH.mm.ss},
166             'short' => q{HH.mm},
167             },
168             } },
169             );
170              
171             has 'datetime_formats' => (
172             is => 'ro',
173             isa => HashRef,
174             init_arg => undef,
175             default => sub { {
176             'generic' => {
177             },
178             'gregorian' => {
179             },
180             } },
181             );
182              
183             has 'datetime_formats_available_formats' => (
184             is => 'ro',
185             isa => HashRef,
186             init_arg => undef,
187             default => sub { {
188             'generic' => {
189             EHm => q{E HH.mm},
190             EHms => q{E HH.mm.ss},
191             Ehm => q{E h.mm a},
192             Ehms => q{E h.mm.ss a},
193             Hm => q{HH.mm},
194             Hms => q{HH.mm.ss},
195             Hmsv => q{HH.mm.ss v},
196             Hmv => q{HH.mm v},
197             hm => q{h.mm a},
198             hms => q{h.mm.ss a},
199             hmsv => q{h.mm.ss a v},
200             hmv => q{h.mm a v},
201             ms => q{mm.ss},
202             },
203             'gregorian' => {
204             EHm => q{E HH.mm},
205             EHms => q{E HH.mm.ss},
206             Ehm => q{E h.mm a},
207             Ehms => q{E h.mm.ss a},
208             Hm => q{HH.mm},
209             Hms => q{HH.mm.ss},
210             Hmsv => q{HH.mm.ss v},
211             Hmv => q{HH.mm v},
212             hm => q{h.mm a},
213             hms => q{h.mm.ss a},
214             hmsv => q{h.mm.ss a v},
215             hmv => q{h.mm a v},
216             ms => q{mm.ss},
217             },
218             } },
219             );
220              
221             has 'datetime_formats_append_item' => (
222             is => 'ro',
223             isa => HashRef,
224             init_arg => undef,
225             default => sub { {
226             } },
227             );
228              
229             has 'datetime_formats_interval' => (
230             is => 'ro',
231             isa => HashRef,
232             init_arg => undef,
233             default => sub { {
234             } },
235             );
236              
237 1     1   2313 no Moo;
  1         2  
  1         4  
238              
239             1;
240              
241             # vim: tabstop=4