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