File Coverage

blib/lib/Locale/CLDR/Locales/En/Latn/Mv.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::En::Latn::Mv - Package for language English
6              
7             =cut
8              
9             package Locale::CLDR::Locales::En::Latn::Mv;
10             # This file auto generated from Data\common\main\en_MV.xml
11             # on Fri 17 Jan 12:03:31 pm GMT
12              
13 1     1   1392 use strict;
  1         2  
  1         34  
14 1     1   4 use warnings;
  1         2  
  1         45  
15 1     1   4 use version;
  1         3  
  1         6  
16              
17             our $VERSION = version->declare('v0.46.0');
18              
19 1     1   97 use v5.12.0;
  1         4  
20 1     1   5 use mro 'c3';
  1         1  
  1         9  
21 1     1   38 use utf8;
  1         3  
  1         9  
22 1     1   39 use feature 'unicode_strings';
  1         2  
  1         707  
23 1     1   8 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         1  
  1         10  
24 1     1   1775 use Moo;
  1         3  
  1         8  
25              
26             extends('Locale::CLDR::Locales::En::Latn::001');
27             has 'number_currency_formats' => (
28             is => 'ro',
29             isa => HashRef,
30             init_arg => undef,
31             default => sub { {
32             'latn' => {
33             'pattern' => {
34             'default' => {
35             'accounting' => {
36             'positive' => '¤ #,##0.00',
37             },
38             'standard' => {
39             'positive' => '¤ #,##0.00',
40             },
41             },
42             },
43             },
44             } },
45             );
46              
47             has 'currencies' => (
48             is => 'ro',
49             isa => HashRef,
50             init_arg => undef,
51             default => sub { {
52             'MVR' => {
53             symbol => 'Rf',
54             },
55             } },
56             );
57              
58              
59             has 'day_period_data' => (
60             is => 'ro',
61             isa => CodeRef,
62             init_arg => undef,
63             default => sub { sub {
64             # Time in hhmm format
65             my ($self, $type, $time, $day_period_type) = @_;
66             $day_period_type //= 'default';
67             SWITCH:
68             for ($type) {
69             if ($_ eq 'gregorian') {
70             if($day_period_type eq 'default') {
71             return 'midnight' if $time == 0;
72             return 'noon' if $time == 1200;
73             return 'afternoon1' if $time >= 1200
74             && $time < 1800;
75             return 'evening1' if $time >= 1800
76             && $time < 2100;
77             return 'morning1' if $time >= 600
78             && $time < 1200;
79             return 'night1' if $time >= 2100;
80             return 'night1' if $time < 600;
81             }
82             if($day_period_type eq 'selection') {
83             return 'afternoon1' if $time >= 1200
84             && $time < 1800;
85             return 'evening1' if $time >= 1800
86             && $time < 2100;
87             return 'morning1' if $time >= 600
88             && $time < 1200;
89             return 'night1' if $time >= 2100;
90             return 'night1' if $time < 600;
91             }
92             last SWITCH;
93             }
94             }
95             } },
96             );
97              
98             around day_period_data => sub {
99             my ($orig, $self) = @_;
100             return $self->$orig;
101             };
102              
103             has 'eras' => (
104             is => 'ro',
105             isa => HashRef,
106             init_arg => undef,
107             default => sub { {
108             'gregorian' => {
109             },
110             } },
111             );
112              
113             has 'date_formats' => (
114             is => 'ro',
115             isa => HashRef,
116             init_arg => undef,
117             default => sub { {
118             'gregorian' => {
119             'full' => q{EEEE d MMMM y},
120             'long' => q{d MMMM y},
121             'medium' => q{dd-MM-y},
122             'short' => q{d-M-yy},
123             },
124             } },
125             );
126              
127             has 'time_formats' => (
128             is => 'ro',
129             isa => HashRef,
130             init_arg => undef,
131             default => sub { {
132             'gregorian' => {
133             'full' => q{HH:mm:ss zzzz},
134             'long' => q{HH:mm:ss z},
135             'medium' => q{HH:mm:ss},
136             'short' => q{HH:mm},
137             },
138             } },
139             );
140              
141             has 'datetime_formats' => (
142             is => 'ro',
143             isa => HashRef,
144             init_arg => undef,
145             default => sub { {
146             'gregorian' => {
147             'full' => q{{1} {0}},
148             'long' => q{{1} {0}},
149             'medium' => q{{1} {0}},
150             'short' => q{{1} {0}},
151             },
152             } },
153             );
154              
155             has 'datetime_formats_available_formats' => (
156             is => 'ro',
157             isa => HashRef,
158             init_arg => undef,
159             default => sub { {
160             } },
161             );
162              
163             has 'datetime_formats_append_item' => (
164             is => 'ro',
165             isa => HashRef,
166             init_arg => undef,
167             default => sub { {
168             } },
169             );
170              
171             has 'datetime_formats_interval' => (
172             is => 'ro',
173             isa => HashRef,
174             init_arg => undef,
175             default => sub { {
176             } },
177             );
178              
179 1     1   1214 no Moo;
  1         3  
  1         7  
180              
181             1;
182              
183             # vim: tabstop=4