File Coverage

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