File Coverage

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