Add built local::lib
[catagits/Gitalist.git] / local-lib5 / man / man3 / DateTime::Locale::Base.3pm
1 .\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.10)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
18 .\" Set up some character translations and predefined strings.  \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
21 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 .    ds -- \(*W-
28 .    ds PI pi
29 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
31 .    ds L" ""
32 .    ds R" ""
33 .    ds C` ""
34 .    ds C' ""
35 'br\}
36 .el\{\
37 .    ds -- \|\(em\|
38 .    ds PI \(*p
39 .    ds L" ``
40 .    ds R" ''
41 'br\}
42 .\"
43 .\" Escape single quotes in literal strings from groff's Unicode transform.
44 .ie \n(.g .ds Aq \(aq
45 .el       .ds Aq '
46 .\"
47 .\" If the F register is turned on, we'll generate index entries on stderr for
48 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
49 .\" entries marked with X<> in POD.  Of course, you'll have to process the
50 .\" output yourself in some meaningful fashion.
51 .ie \nF \{\
52 .    de IX
53 .    tm Index:\\$1\t\\n%\t"\\$2"
54 ..
55 .    nr % 0
56 .    rr F
57 .\}
58 .el \{\
59 .    de IX
60 ..
61 .\}
62 .\"
63 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
64 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
65 .    \" fudge factors for nroff and troff
66 .if n \{\
67 .    ds #H 0
68 .    ds #V .8m
69 .    ds #F .3m
70 .    ds #[ \f1
71 .    ds #] \fP
72 .\}
73 .if t \{\
74 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
75 .    ds #V .6m
76 .    ds #F 0
77 .    ds #[ \&
78 .    ds #] \&
79 .\}
80 .    \" simple accents for nroff and troff
81 .if n \{\
82 .    ds ' \&
83 .    ds ` \&
84 .    ds ^ \&
85 .    ds , \&
86 .    ds ~ ~
87 .    ds /
88 .\}
89 .if t \{\
90 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
91 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
92 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
93 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
94 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
95 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
96 .\}
97 .    \" troff and (daisy-wheel) nroff accents
98 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
99 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
100 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
101 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
102 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
103 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
104 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
105 .ds ae a\h'-(\w'a'u*4/10)'e
106 .ds Ae A\h'-(\w'A'u*4/10)'E
107 .    \" corrections for vroff
108 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
109 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
110 .    \" for low resolution devices (crt and lpr)
111 .if \n(.H>23 .if \n(.V>19 \
112 \{\
113 .    ds : e
114 .    ds 8 ss
115 .    ds o a
116 .    ds d- d\h'-1'\(ga
117 .    ds D- D\h'-1'\(hy
118 .    ds th \o'bp'
119 .    ds Th \o'LP'
120 .    ds ae ae
121 .    ds Ae AE
122 .\}
123 .rm #[ #] #H #V #F C
124 .\" ========================================================================
125 .\"
126 .IX Title "DateTime::Locale::Base 3"
127 .TH DateTime::Locale::Base 3 "2009-09-12" "perl v5.8.7" "User Contributed Perl Documentation"
128 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
129 .\" way too many mistakes in technical documents.
130 .if n .ad l
131 .nh
132 .SH "NAME"
133 DateTime::Locale::Base \- Base class for individual locale objects
134 .SH "SYNOPSIS"
135 .IX Header "SYNOPSIS"
136 .Vb 1
137 \&  use base \*(AqDateTime::Locale::Base\*(Aq;
138 .Ve
139 .SH "DEFAULT FORMATS"
140 .IX Header "DEFAULT FORMATS"
141 Each locale has a set of four default date and time formats.  They are
142 distinguished by length, and are called \*(L"full\*(R", \*(L"long\*(R", \*(L"medium\*(R", and
143 \&\*(L"short\*(R". Each locale may have a different default length which it uses
144 when its \f(CW\*(C`$locale\->date_format_default()\*(C'\fR, \f(CW\*(C`$locale\->time_format_default()\*(C'\fR, or \f(CW\*(C`$locale\->datetime_format_default()\*(C'\fR methods are called.
145 .PP
146 This can be changed by calling the \f(CW\*(C`$locale\->set_default_date_format()\*(C'\fR or \f(CW\*(C`$locale\->set_default_time_format()\*(C'\fR methods.  These methods accept a
147 string which must be one of \*(L"full\*(R", \*(L"long\*(R", \*(L"medium\*(R", or \*(L"short\*(R".
148 .SH "NAME FORMS"
149 .IX Header "NAME FORMS"
150 Most names come in a number of variations. First, they may vary based
151 on length, with wide, abbreviated, and narrow forms. The wide form is
152 typically the full name, while the narrow form is often a single
153 character. The narrow forms may not be unique. For example, \*(L"T\*(R" may be
154 used for Tuesday and Thursday in the English narrow forms.
155 .PP
156 Many names also distinguish between \*(L"format\*(R" and \*(L"stand-alone\*(R" forms
157 of a pattern. The format pattern is used when the thing in question is
158 being placed into a larger string. The stand-alone form is used when
159 displaying that item by itself, for example in a calendar.
160 .SH "METHODS"
161 .IX Header "METHODS"
162 All locales provide the following methods:
163 .IP "\(bu" 4
164 \&\f(CW$locale\fR\->\fIid()\fR
165 .Sp
166 The locale's id.
167 .IP "\(bu" 4
168 \&\f(CW$locale\fR\->\fIlanguage_id()\fR
169 .Sp
170 The language portion of the id.
171 .IP "\(bu" 4
172 \&\f(CW$locale\fR\->\fIscript_id()\fR
173 .Sp
174 The script portion of the id, if any.
175 .IP "\(bu" 4
176 \&\f(CW$locale\fR\->\fIterritory_id()\fR
177 .Sp
178 The territory portion of the id, if any.
179 .IP "\(bu" 4
180 \&\f(CW$locale\fR\->\fIvariant_id()\fR
181 .Sp
182 The variant portion of the id, if any.
183 .IP "\(bu" 4
184 \&\f(CW$locale\fR\->\fIname()\fR
185 .Sp
186 The full name for the locale in English.
187 .IP "\(bu" 4
188 \&\f(CW$locale\fR\->\fIlanguage()\fR
189 .Sp
190 The language name for the locale in English.
191 .IP "\(bu" 4
192 \&\f(CW$locale\fR\->\fIscript()\fR
193 .Sp
194 The script name for the locale in English, if any.
195 .IP "\(bu" 4
196 \&\f(CW$locale\fR\->\fIterritory()\fR
197 .Sp
198 The territory name for the locale in English, if any.
199 .IP "\(bu" 4
200 \&\f(CW$locale\fR\->\fIvariant()\fR
201 .Sp
202 The variant name for the locale in English, if any.
203 .IP "\(bu" 4
204 \&\f(CW$locale\fR\->\fInative_name()\fR
205 .Sp
206 The full name for the locale in its native language, if any.
207 .IP "\(bu" 4
208 \&\f(CW$locale\fR\->\fInative_language()\fR
209 .Sp
210 The language name for the locale in its native language, if any.
211 .IP "\(bu" 4
212 \&\f(CW$locale\fR\->\fInative_script()\fR
213 .Sp
214 The script name for the locale in its native language, if any.
215 .IP "\(bu" 4
216 \&\f(CW$locale\fR\->\fInative_territory()\fR
217 .Sp
218 The territory name for the locale in its native language, if any.
219 .IP "\(bu" 4
220 \&\f(CW$locale\fR\->\fInative_variant()\fR
221 .Sp
222 The variant name for the locale in its native language, if any.
223 .IP "\(bu" 4
224 \&\f(CW$locale\fR\->\fImonth_format_wide()\fR
225 .Sp
226 Returns an array reference containing the wide format names of the
227 months, with January as the first month.
228 .IP "\(bu" 4
229 \&\f(CW$locale\fR\->\fImonth_format_abbreviated()\fR
230 .Sp
231 Returns an array reference containing the abbreviated format names of
232 the months, with January as the first month.
233 .IP "\(bu" 4
234 \&\f(CW$locale\fR\->\fImonth_format_narrow()\fR
235 .Sp
236 Returns an array reference containing the narrow format names of the
237 months, with January as the first month.
238 .IP "\(bu" 4
239 \&\f(CW$locale\fR\->\fImonth_stand_alone_wide()\fR
240 .Sp
241 Returns an array reference containing the wide stand-alone names of
242 the months, with January as the first month.
243 .IP "\(bu" 4
244 \&\f(CW$locale\fR\->\fImonth_stand_alone_abbreviated()\fR
245 .Sp
246 Returns an array reference containing the abbreviated stand-alone
247 names of the months, with January as the first month.
248 .IP "\(bu" 4
249 \&\f(CW$locale\fR\->\fImonth_stand_alone_narrow()\fR
250 .Sp
251 Returns an array reference containing the narrow stand-alone names of the
252 months, with January as the first month.
253 .IP "\(bu" 4
254 \&\f(CW$locale\fR\->\fIday_format_wide()\fR
255 .Sp
256 Returns an array reference containing the wide format names of the
257 days, with Monday as the first day.
258 .IP "\(bu" 4
259 \&\f(CW$locale\fR\->\fIday_format_abbreviated()\fR
260 .Sp
261 Returns an array reference containing the abbreviated format names of
262 the days, with Monday as the first day.
263 .IP "\(bu" 4
264 \&\f(CW$locale\fR\->\fIday_format_narrow()\fR
265 .Sp
266 Returns an array reference containing the narrow format names of the
267 days, with Monday as the first day.
268 .IP "\(bu" 4
269 \&\f(CW$locale\fR\->\fIday_stand_alone_wide()\fR
270 .Sp
271 Returns an array reference containing the wide stand-alone names of
272 the days, with Monday as the first day.
273 .IP "\(bu" 4
274 \&\f(CW$locale\fR\->\fIday_stand_alone_abbreviated()\fR
275 .Sp
276 Returns an array reference containing the abbreviated stand-alone
277 names of the days, with Monday as the first day.
278 .IP "\(bu" 4
279 \&\f(CW$locale\fR\->\fIday_stand_alone_narrow()\fR
280 .Sp
281 Returns an array reference containing the narrow stand-alone names of
282 the days, with Monday as the first day.
283 .IP "\(bu" 4
284 \&\f(CW$locale\fR\->\fIquarter_format_wide()\fR
285 .Sp
286 Returns an array reference containing the wide format names of the
287 quarters.
288 .IP "\(bu" 4
289 \&\f(CW$locale\fR\->\fIquarter_format_abbreviated()\fR
290 .Sp
291 Returns an array reference containing the abbreviated format names of
292 the quarters.
293 .IP "\(bu" 4
294 \&\f(CW$locale\fR\->\fIquarter_format_narrow()\fR
295 .Sp
296 Returns an array reference containing the narrow format names of the
297 quarters.
298 .IP "\(bu" 4
299 \&\f(CW$locale\fR\->\fIquarter_stand_alone_wide()\fR
300 .Sp
301 Returns an array reference containing the wide stand-alone names of
302 the quarters.
303 .IP "\(bu" 4
304 \&\f(CW$locale\fR\->\fIquarter_stand_alone_abbreviated()\fR
305 .Sp
306 Returns an array reference containing the abbreviated stand-alone
307 names of the quarters.
308 .IP "\(bu" 4
309 \&\f(CW$locale\fR\->\fIquarter_stand_alone_narrow()\fR
310 .Sp
311 Returns an array reference containing the narrow stand-alone names of the
312 quarters.
313 .IP "\(bu" 4
314 \&\f(CW$locale\fR\->\fIera_wide()\fR
315 .Sp
316 Returns an array reference containing the wide names of the eras, with
317 \&\*(L"\s-1BCE\s0\*(R" first.
318 .IP "\(bu" 4
319 \&\f(CW$locale\fR\->\fIera_abbreviated()\fR
320 .Sp
321 Returns an array reference containing the abbreviated names of the
322 eras, with \*(L"\s-1BCE\s0\*(R" first.
323 .IP "\(bu" 4
324 \&\f(CW$locale\fR\->\fIera_narrow()\fR
325 .Sp
326 Returns an array reference containing the abbreviated names of the
327 eras, with \*(L"\s-1BCE\s0\*(R" first. However, most locales do not differ between
328 the narrow and abbreviated length of the era.
329 .IP "\(bu" 4
330 \&\f(CW$locale\fR\->\fIam_pm_abbreviated()\fR
331 .Sp
332 Returns an array reference containing the abbreviated names of \*(L"\s-1AM\s0\*(R"
333 and \*(L"\s-1PM\s0\*(R".
334 .IP "\(bu" 4
335 \&\f(CW$locale\fR\->\fIdate_format_long()\fR
336 .IP "\(bu" 4
337 \&\f(CW$locale\fR\->\fIdate_format_full()\fR
338 .IP "\(bu" 4
339 \&\f(CW$locale\fR\->\fIdate_format_medium()\fR
340 .IP "\(bu" 4
341 \&\f(CW$locale\fR\->\fIdate_format_short()\fR
342 .Sp
343 Returns the \s-1CLDR\s0 date pattern of the appropriate length.
344 .IP "\(bu" 4
345 \&\f(CW$locale\fR\->\fIdate_formats()\fR
346 .Sp
347 Returns a hash reference of \s-1CLDR\s0 date patterns for the date formats,
348 where the keys are \*(L"full\*(R", \*(L"long\*(R", \*(L"medium\*(R", and \*(L"short\*(R".
349 .IP "\(bu" 4
350 \&\f(CW$locale\fR\->\fItime_format_long()\fR
351 .IP "\(bu" 4
352 \&\f(CW$locale\fR\->\fItime_format_full()\fR
353 .IP "\(bu" 4
354 \&\f(CW$locale\fR\->\fItime_format_medium()\fR
355 .IP "\(bu" 4
356 \&\f(CW$locale\fR\->\fItime_format_short()\fR
357 .Sp
358 Returns the \s-1CLDR\s0 date pattern of the appropriate length.
359 .IP "\(bu" 4
360 \&\f(CW$locale\fR\->\fItime_formats()\fR
361 .Sp
362 Returns a hash reference of \s-1CLDR\s0 date patterns for the time formats,
363 where the keys are \*(L"full\*(R", \*(L"long\*(R", \*(L"medium\*(R", and \*(L"short\*(R".
364 .IP "\(bu" 4
365 \&\f(CW$locale\fR\->\fIdatetime_format_long()\fR
366 .IP "\(bu" 4
367 \&\f(CW$locale\fR\->\fIdatetime_format_full()\fR
368 .IP "\(bu" 4
369 \&\f(CW$locale\fR\->\fIdatetime_format_medium()\fR
370 .IP "\(bu" 4
371 \&\f(CW$locale\fR\->\fIdatetime_format_short()\fR
372 .Sp
373 Returns the \s-1CLDR\s0 date pattern of the appropriate length.
374 .IP "\(bu" 4
375 \&\f(CW$locale\fR\->\fIdatetime_formats()\fR
376 .Sp
377 Returns a hash reference of \s-1CLDR\s0 date patterns for the datetime
378 formats, where the keys are \*(L"full\*(R", \*(L"long\*(R", \*(L"medium\*(R", and \*(L"short\*(R".
379 .IP "\(bu" 4
380 \&\f(CW$locale\fR\->\fIdate_format_default()\fR
381 .IP "\(bu" 4
382 \&\f(CW$locale\fR\->\fItime_format_default()\fR
383 .IP "\(bu" 4
384 \&\f(CW$locale\fR\->\fIdatetime_format_default()\fR
385 .Sp
386 Returns the default \s-1CLDR\s0 date pattern. The length of this format is
387 based on the value of \f(CW\*(C`$locale\->default_date_format_length()\*(C'\fR
388 and/or \f(CW\*(C`$locale\->default_time_format_length()\*(C'\fR.
389 .IP "\(bu" 4
390 \&\f(CW$locale\fR\->\fIdefault_date_format_length()\fR
391 .IP "\(bu" 4
392 \&\f(CW$locale\fR\->\fIdefault_time_format_length()\fR
393 .Sp
394 Returns the default length for the format, one of \*(L"full\*(R", \*(L"long\*(R",
395 \&\*(L"medium\*(R", or \*(L"short\*(R".
396 .IP "\(bu" 4
397 \&\f(CW$locale\fR\->\fIset_default_date_format_length()\fR
398 .IP "\(bu" 4
399 \&\f(CW$locale\fR\->\fIset_default_time_format_length()\fR
400 .Sp
401 Sets the default length for the format. This must be one of \*(L"full\*(R",
402 \&\*(L"long\*(R", \*(L"medium\*(R", or \*(L"short\*(R".
403 .IP "\(bu" 4
404 \&\f(CW$locale\fR\->\fIprefers_24_hour_time()\fR
405 .Sp
406 Returns a boolean indicating the preferred hour format for this
407 locale.
408 .IP "\(bu" 4
409 \&\f(CW$locale\fR\->\fIfirst_day_of_week()\fR
410 .Sp
411 Returns a number from 1 to 7 indicating the \fIlocal\fR first day of the
412 week. For example, for a \s-1US\s0 locale this returns 7.
413 .IP "\(bu" 4
414 \&\f(CW$locale\fR\->\fIavailable_formats()\fR
415 .Sp
416 A list of format names, like \*(L"MMdd\*(R" or \*(L"yyyyMM\*(R". This should be the
417 list directly supported by the subclass, not its parents.
418 .IP "\(bu" 4
419 \&\f(CW$locale\fR\->format_for($key)
420 .Sp
421 Given a valid name, returns the \s-1CLDR\s0 date pattern for that thing, if
422 one exists.
423 .SH "SUPPORT"
424 .IX Header "SUPPORT"
425 See DateTime::Locale.
426 .SH "AUTHORS"
427 .IX Header "AUTHORS"
428 Richard Evans <rich@ridas.com>
429 .PP
430 Dave Rolsky <autarch@urth.org>
431 .SH "COPYRIGHT"
432 .IX Header "COPYRIGHT"
433 Copyright (c) 2003 Richard Evans. Copyright (c) 2004\-2005 David
434 Rolsky. All rights reserved. This program is free software; you can
435 redistribute it and/or modify it under the same terms as Perl itself.
436 .PP
437 This program is free software; you can redistribute it and/or modify
438 it under the same terms as Perl itself.
439 .PP
440 The full text of the license can be found in the \s-1LICENSE\s0 file included
441 with this module.