1Date::Manip::Lang(3)  User Contributed Perl Documentation Date::Manip::Lang(3)
2
3
4

NAME

6       Date::Manip::Lang - date manipulation routines (language
7       initialization)
8

DESCRIPTION

10       This module is a series of routines, one per language, used to
11       initialize the support for different languages in Date::Manip
12

ADDING A LANGUAGE

14       Adding a language is easily done.  If you want to add a language, refer
15       to the files in module that live in: lib/Date/Manip/Lang .
16
17       First, send me the name of the language (in ASCII character) as well as
18       any locale designations.
19
20       For example, to create a Spanish translation (which is not necessary
21       since it already exists), I need the following list::
22
23          spanish es es_es
24
25       The first word is the name of the language. Copy copy the english.pm
26       file to spanish.pm.
27
28       The language file you just created is a new module containing the data
29       for that language. It needs to be modified in the following ways:
30
31       ·   Change "english" to "spanish" everywhere it appears in the new
32           file.  Also change "English" to "Spanish".
33
34       ·   Look for a line of the form:
35
36              @Encodings = qw();
37
38           and change it to include the encodings most often used by this
39           language. For example,
40
41              @Encodings = qw(utf-8 iso-8859-1 perl);
42
43           Always include 'utf-8' and 'perl' as the first and last elements in
44           the list.
45
46       ·   Change all of the data (after the __DATA__ line) as described
47           below.
48
49       The data section of the module (which is written in YAML) is fairly
50       straightforward to translate.
51
52       Where possible, please store all data in UTF-8 characters. If you have
53       to escape high-byte characters, or use some other character encoding,
54       please let me know. I'll do my best to deal with it, but it will delay
55       me incorporating the translation into the module.
56
57       Most of the sections below can contain any number of alternate words
58       which imply the same thing. Any time a list contains multiple words,
59       the first should be the 'preferred' or most common word.
60
61       If a word contains UTF-8 characters which have a simple ASCII
62       equivalent, you should include both forms. For example, the spanish
63       name for Saturday in ASCII would be written sabado, but in reality, the
64       first 'a' has an accent over it. This word should appear twice... first
65       in full UTF-8 encoding, and second as all ASCII. If the language
66       (Russian for example) has no ASCII equivalent, just include the UTF-8
67       representation.
68
69       ampm
70           The ampm section consists of two lists of words. The first section
71           are words which can be included after a time to designate a morning
72           time (i.e. AM). The second set are words which designate an
73           afternoon time (i.e. PM).
74
75       at  The word 'at' as it appears in the phrase:
76
77              AT 3:00
78
79       day_abb, day_char, day_name
80           These are each a list of seven elements which refer to the days
81           Monday through Sunday.
82
83           day_char is typically a one or two character designation of the day
84           (M, T, W, ...).
85
86           day_abb is an abbreviation for the day (Mon, Tue, Wed, ...).
87
88           day_name is the full day name (Monday, Tuesday, ...).
89
90       each
91           This is a list of words that could be used to translate the
92           following phrases:
93
94              EACH Monday
95
96              EVERY Monday
97
98              EVERY month
99
100       fields
101           These are the names of the fields in a delta. There are 7 fields:
102           years, months, weeks, days, hours, minutes, seconds.
103
104           The first field would be the ways that you might name the years
105           field:
106
107              YEARS YEAR YRS YR
108
109       last
110           This is a list of words that could be used to translate the
111           following phrase:
112
113              LAST day of the month
114
115       mode
116           This contains two lists of words which can be used to specify
117           whether a delta is exact, approximate, or business.
118
119           The first list contains words which would specify exact or
120           approximate deltas.  In other words, a delta could be specified:
121
122              in EXACTLY 3 hours
123
124              in APPROXIMATELY 3 hours
125
126           The second list contains words which would specify business deltas.
127           In other words:
128
129              in 3 BUSINESS days
130
131       month_abb, month_name
132           These specify the abbreviation and name respectively of the 12
133           months.
134
135       nextprev
136           This contains two sets of words. The first specifies the next
137           element, and would be used to translate the following phrases:
138
139              NEXT week
140
141              NEXT Tuesday
142
143           The second set specifies the previous element, and would be used to
144           translate the following phrases:
145
146              LAST Tuesday
147
148              PREVIOUS week
149
150       nth This contains the numbers from 1-53. The first element should be
151           the equivalent of '1st', '2nd', Additional elements should be the
152           equivalent of the number spelled out (one, two, ...) and the
153           ordinal number spelled out (first, second, ...).
154
155       of  This is a word which might be used to translate the following
156           phrases:
157
158              1st dat OF December
159
160              1st day IN December
161
162       offset_date
163           This actually contains a hash, rather than a list.
164
165           Most languages have special words which refer to a day relative to
166           today.  The most common (in English) are:
167
168              TODAY
169              TOMORROW
170              YESTERDAY
171
172           The keys of the hash are the words, and the values of the hash are
173           a delta which can be used to get the date relative to today.
174
175           For example, tomorrow is the delta '+0:0:0:1:0:0:0'.
176
177           If the word contains UTF-8 characters, please include it twice,
178           once with the UTF-8 characters, and once as ASCII (if relevant).
179
180       offset_time
181           This is a hash similar to offset_date.
182
183           Most languages have words which might refer to times relative to
184           the current time. In English, the only common word is
185
186              NOW
187
188           but in other languages, there may be other common words.
189
190       on  This is a word which might be used to translate the following
191           phrases:
192
193              ON July 5th
194
195       times
196           This is a hash similar to offset_date.
197
198           Most languages have special words which refer to specific times of
199           the day. In English, these include:
200
201              NOON
202              MIDNIGHT
203
204       when
205           This is two lists of words. The first list would be in a delta
206           referring to a time in the past. For example:
207
208              5 hours AGO
209
210              5 hours EARLIER
211
212           The second list of words would be in a delta referring to a time in
213           the future. For example:
214
215              IN 5 hours
216
217              5 hours LATER
218

SEE ALSO

220       Date::Manip        - main module documentation
221

LICENSE

223       This script is free software; you can redistribute it and/or modify it
224       under the same terms as Perl itself.
225

AUTHOR

227       Sullivan Beck (sbeck@cpan.org)
228
229
230
231perl v5.10.1                      2011-12-07              Date::Manip::Lang(3)
Impressum