File Coverage

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