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