File Coverage

blib/lib/Locale/CLDR/Locales/Da/Any/Gl.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::Da::Any::Gl - Package for language Danish
4              
5             =cut
6              
7             package Locale::CLDR::Locales::Da::Any::Gl;
8             # This file auto generated from Data\common\main\da_GL.xml
9             # on Sun 24 Apr 8:22:01 am GMT
10              
11 1     1   809 use version;
  1         2  
  1         7  
12              
13             our $VERSION = version->declare('v0.29.0');
14              
15 1     1   82 use v5.10.1;
  1         3  
16 1     1   3 use mro 'c3';
  1         1  
  1         6  
17 1     1   27 use utf8;
  1         1  
  1         7  
18 1     1   25 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         1  
  1         21  
19              
20 1     1   143 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         1  
  1         7  
21 1     1   703 use Moo;
  1         1  
  1         6  
22              
23             extends('Locale::CLDR::Locales::Da::Any');
24             has 'day_period_data' => (
25             is => 'ro',
26             isa => CodeRef,
27             init_arg => undef,
28             default => sub { sub {
29             # Time in hhmm format
30             my ($self, $type, $time, $day_period_type) = @_;
31             $day_period_type //= 'default';
32             SWITCH:
33             for ($type) {
34             if ($_ eq 'gregorian') {
35             if($day_period_type eq 'default') {
36             return 'midnight' if $time == 0;
37             return 'afternoon1' if $time >= 1200
38             && $time < 1800;
39             return 'morning1' if $time >= 500
40             && $time < 1000;
41             return 'morning2' if $time >= 1000
42             && $time < 1200;
43             return 'night1' if $time >= 0
44             && $time < 500;
45             return 'evening1' if $time >= 1800
46             && $time < 2400;
47             }
48             if($day_period_type eq 'selection') {
49             return 'morning2' if $time >= 1000
50             && $time < 1200;
51             return 'night1' if $time >= 0
52             && $time < 500;
53             return 'afternoon1' if $time >= 1200
54             && $time < 1800;
55             return 'morning1' if $time >= 500
56             && $time < 1000;
57             return 'evening1' if $time >= 1800
58             && $time < 2400;
59             }
60             last SWITCH;
61             }
62             }
63             } },
64             );
65              
66             around day_period_data => sub {
67             my ($orig, $self) = @_;
68             return $self->$orig;
69             };
70              
71             has 'eras' => (
72             is => 'ro',
73             isa => HashRef,
74             init_arg => undef,
75             default => sub { {
76             'gregorian' => {
77             },
78             } },
79             );
80              
81             has 'date_formats' => (
82             is => 'ro',
83             isa => HashRef,
84             init_arg => undef,
85             default => sub { {
86             'gregorian' => {
87             },
88             } },
89             );
90              
91             has 'time_formats' => (
92             is => 'ro',
93             isa => HashRef,
94             init_arg => undef,
95             default => sub { {
96             'gregorian' => {
97             'full' => q{h.mm.ss a zzzz},
98             'long' => q{h.mm.ss a z},
99             'medium' => q{h.mm.ss a},
100             'short' => q{h.mm a},
101             },
102             } },
103             );
104              
105             has 'datetime_formats' => (
106             is => 'ro',
107             isa => HashRef,
108             init_arg => undef,
109             default => sub { {
110             'gregorian' => {
111             },
112             } },
113             );
114              
115             has 'datetime_formats_available_formats' => (
116             is => 'ro',
117             isa => HashRef,
118             init_arg => undef,
119             default => sub { {
120             } },
121             );
122              
123             has 'datetime_formats_append_item' => (
124             is => 'ro',
125             isa => HashRef,
126             init_arg => undef,
127             default => sub { {
128             } },
129             );
130              
131             has 'datetime_formats_interval' => (
132             is => 'ro',
133             isa => HashRef,
134             init_arg => undef,
135             default => sub { {
136             } },
137             );
138              
139 1     1   2182 no Moo;
  1         2  
  1         4  
140              
141             1;
142              
143             # vim: tabstop=4