File Coverage

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