File Coverage

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