File Coverage

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