.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "DateTime::Locale::Base 3pm" .TH DateTime::Locale::Base 3pm "2013-05-26" "perl v5.14.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" DateTime::Locale::Base \- DateTime locale package for "Base" \- Base class for individual locale objects .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use base \*(AqDateTime::Locale::Base\*(Aq; .Ve .SH "DEFAULT FORMATS" .IX Header "DEFAULT FORMATS" Each locale has a set of four default date and time formats. They are distinguished by length, and are called \*(L"full\*(R", \*(L"long\*(R", \*(L"medium\*(R", and \&\*(L"short\*(R". Each locale may have a different default length which it uses 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. .PP 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 string which must be one of \*(L"full\*(R", \*(L"long\*(R", \*(L"medium\*(R", or \*(L"short\*(R". .SH "NAME FORMS" .IX Header "NAME FORMS" Most names come in a number of variations. First, they may vary based on length, with wide, abbreviated, and narrow forms. The wide form is typically the full name, while the narrow form is often a single character. The narrow forms may not be unique. For example, \*(L"T\*(R" may be used for Tuesday and Thursday in the English narrow forms. .PP Many names also distinguish between \*(L"format\*(R" and \*(L"stand-alone\*(R" forms of a pattern. The format pattern is used when the thing in question is being placed into a larger string. The stand-alone form is used when displaying that item by itself, for example in a calendar. .SH "METHODS" .IX Header "METHODS" All locales provide the following methods: .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIid()\fR .Sp The locale's id. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIlanguage_id()\fR .Sp The language portion of the id. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIscript_id()\fR .Sp The script portion of the id, if any. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIterritory_id()\fR .Sp The territory portion of the id, if any. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIvariant_id()\fR .Sp The variant portion of the id, if any. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIname()\fR .Sp The full name for the locale in English. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIlanguage()\fR .Sp The language name for the locale in English. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIscript()\fR .Sp The script name for the locale in English, if any. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIterritory()\fR .Sp The territory name for the locale in English, if any. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIvariant()\fR .Sp The variant name for the locale in English, if any. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fInative_name()\fR .Sp The full name for the locale in its native language, if any. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fInative_language()\fR .Sp The language name for the locale in its native language, if any. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fInative_script()\fR .Sp The script name for the locale in its native language, if any. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fInative_territory()\fR .Sp The territory name for the locale in its native language, if any. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fInative_variant()\fR .Sp The variant name for the locale in its native language, if any. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fImonth_format_wide()\fR .Sp Returns an array reference containing the wide format names of the months, with January as the first month. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fImonth_format_abbreviated()\fR .Sp Returns an array reference containing the abbreviated format names of the months, with January as the first month. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fImonth_format_narrow()\fR .Sp Returns an array reference containing the narrow format names of the months, with January as the first month. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fImonth_stand_alone_wide()\fR .Sp Returns an array reference containing the wide stand-alone names of the months, with January as the first month. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fImonth_stand_alone_abbreviated()\fR .Sp Returns an array reference containing the abbreviated stand-alone names of the months, with January as the first month. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fImonth_stand_alone_narrow()\fR .Sp Returns an array reference containing the narrow stand-alone names of the months, with January as the first month. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIday_format_wide()\fR .Sp Returns an array reference containing the wide format names of the days, with Monday as the first day. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIday_format_abbreviated()\fR .Sp Returns an array reference containing the abbreviated format names of the days, with Monday as the first day. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIday_format_narrow()\fR .Sp Returns an array reference containing the narrow format names of the days, with Monday as the first day. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIday_stand_alone_wide()\fR .Sp Returns an array reference containing the wide stand-alone names of the days, with Monday as the first day. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIday_stand_alone_abbreviated()\fR .Sp Returns an array reference containing the abbreviated stand-alone names of the days, with Monday as the first day. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIday_stand_alone_narrow()\fR .Sp Returns an array reference containing the narrow stand-alone names of the days, with Monday as the first day. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIquarter_format_wide()\fR .Sp Returns an array reference containing the wide format names of the quarters. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIquarter_format_abbreviated()\fR .Sp Returns an array reference containing the abbreviated format names of the quarters. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIquarter_format_narrow()\fR .Sp Returns an array reference containing the narrow format names of the quarters. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIquarter_stand_alone_wide()\fR .Sp Returns an array reference containing the wide stand-alone names of the quarters. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIquarter_stand_alone_abbreviated()\fR .Sp Returns an array reference containing the abbreviated stand-alone names of the quarters. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIquarter_stand_alone_narrow()\fR .Sp Returns an array reference containing the narrow stand-alone names of the quarters. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIera_wide()\fR .Sp Returns an array reference containing the wide names of the eras, with \&\*(L"\s-1BCE\s0\*(R" first. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIera_abbreviated()\fR .Sp Returns an array reference containing the abbreviated names of the eras, with \*(L"\s-1BCE\s0\*(R" first. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIera_narrow()\fR .Sp Returns an array reference containing the abbreviated names of the eras, with \*(L"\s-1BCE\s0\*(R" first. However, most locales do not differ between the narrow and abbreviated length of the era. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIam_pm_abbreviated()\fR .Sp Returns an array reference containing the abbreviated names of \*(L"\s-1AM\s0\*(R" and \*(L"\s-1PM\s0\*(R". .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIdate_format_long()\fR .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIdate_format_full()\fR .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIdate_format_medium()\fR .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIdate_format_short()\fR .Sp Returns the \s-1CLDR\s0 date pattern of the appropriate length. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIdate_formats()\fR .Sp Returns a hash reference of \s-1CLDR\s0 date patterns for the date formats, where the keys are \*(L"full\*(R", \*(L"long\*(R", \*(L"medium\*(R", and \*(L"short\*(R". .IP "\(bu" 4 \&\f(CW$locale\fR\->\fItime_format_long()\fR .IP "\(bu" 4 \&\f(CW$locale\fR\->\fItime_format_full()\fR .IP "\(bu" 4 \&\f(CW$locale\fR\->\fItime_format_medium()\fR .IP "\(bu" 4 \&\f(CW$locale\fR\->\fItime_format_short()\fR .Sp Returns the \s-1CLDR\s0 date pattern of the appropriate length. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fItime_formats()\fR .Sp Returns a hash reference of \s-1CLDR\s0 date patterns for the time formats, where the keys are \*(L"full\*(R", \*(L"long\*(R", \*(L"medium\*(R", and \*(L"short\*(R". .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIdatetime_format_long()\fR .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIdatetime_format_full()\fR .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIdatetime_format_medium()\fR .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIdatetime_format_short()\fR .Sp Returns the \s-1CLDR\s0 date pattern of the appropriate length. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIdatetime_formats()\fR .Sp Returns a hash reference of \s-1CLDR\s0 date patterns for the datetime formats, where the keys are \*(L"full\*(R", \*(L"long\*(R", \*(L"medium\*(R", and \*(L"short\*(R". .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIdate_format_default()\fR .IP "\(bu" 4 \&\f(CW$locale\fR\->\fItime_format_default()\fR .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIdatetime_format_default()\fR .Sp Returns the default \s-1CLDR\s0 date pattern. The length of this format is based on the value of \f(CW\*(C`$locale\->default_date_format_length()\*(C'\fR and/or \f(CW\*(C`$locale\->default_time_format_length()\*(C'\fR. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIdefault_date_format_length()\fR .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIdefault_time_format_length()\fR .Sp Returns the default length for the format, one of \*(L"full\*(R", \*(L"long\*(R", \&\*(L"medium\*(R", or \*(L"short\*(R". .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIset_default_date_format_length()\fR .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIset_default_time_format_length()\fR .Sp Sets the default length for the format. This must be one of \*(L"full\*(R", \&\*(L"long\*(R", \*(L"medium\*(R", or \*(L"short\*(R". .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIprefers_24_hour_time()\fR .Sp Returns a boolean indicating the preferred hour format for this locale. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIfirst_day_of_week()\fR .Sp Returns a number from 1 to 7 indicating the \fIlocal\fR first day of the week, with Monday being 1 and Sunday being 7. For example, for a \s-1US\s0 locale this returns 7. .IP "\(bu" 4 \&\f(CW$locale\fR\->\fIavailable_formats()\fR .Sp A list of format names, like \*(L"MMdd\*(R" or \*(L"yyyyMM\*(R". This should be the list directly supported by the subclass, not its parents. .IP "\(bu" 4 \&\f(CW$locale\fR\->format_for($key) .Sp Given a valid name, returns the \s-1CLDR\s0 date pattern for that thing, if one exists. .SH "SUPPORT" .IX Header "SUPPORT" See DateTime::Locale. .SH "AUTHORS" .IX Header "AUTHORS" Richard Evans .PP Dave Rolsky .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 2003 Richard Evans. Copyright (c) 2004\-2005 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .PP The full text of the license can be found in the \s-1LICENSE\s0 file included with this module.