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 NAME
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 Fri 13 Oct 9:46:27 am GMT
12              
13 1     1   1144 use strict;
  1         2  
  1         29  
14 1     1   5 use warnings;
  1         2  
  1         25  
15 1     1   6 use version;
  1         2  
  1         14  
16              
17             our $VERSION = version->declare('v0.34.2');
18              
19 1     1   96 use v5.10.1;
  1         3  
20 1     1   4 use mro 'c3';
  1         2  
  1         7  
21 1     1   23 use utf8;
  1         1  
  1         7  
22 1     1   29 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         2  
  1         13  
23 1     1   126 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         1  
  1         10  
24 1     1   994 use Moo;
  1         2  
  1         5  
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 'default') {
39             return 'midnight' if $time == 0;
40             return 'noon' if $time == 1200;
41             return 'afternoon1' if $time >= 1200
42             && $time < 1800;
43             return 'afternoon2' if $time >= 1800
44             && $time < 1900;
45             return 'evening1' if $time >= 1900
46             && $time < 2100;
47             return 'morning1' if $time >= 600
48             && $time < 1100;
49             return 'morning2' if $time >= 1100
50             && $time < 1200;
51             return 'night1' if $time >= 2100;
52             return 'night1' if $time < 600;
53             }
54             if($day_period_type eq 'selection') {
55             return 'afternoon1' if $time >= 1200
56             && $time < 1800;
57             return 'afternoon2' if $time >= 1800
58             && $time < 1900;
59             return 'evening1' if $time >= 1900
60             && $time < 2100;
61             return 'morning1' if $time >= 600
62             && $time < 1100;
63             return 'morning2' if $time >= 1100
64             && $time < 1200;
65             return 'night1' if $time >= 2100;
66             return 'night1' if $time < 600;
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   881 no Moo;
  1         2  
  1         3  
148              
149             1;
150              
151             # vim: tabstop=4