.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' '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 >0, 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. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DateTime::Locale::Base 3pm" .TH DateTime::Locale::Base 3pm 2024-04-06 "perl v5.38.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 \- Base class for individual locale objects (deprecated) .SH VERSION .IX Header "VERSION" version 1.41 .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use base \*(AqDateTime::Locale::Base\*(Aq; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBThis module is no longer used by the code in the distribution.\fR It is still included for the sake of any code out in the wild that may subclass this class. This class will be removed in a future release. .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 "full", "long", "medium", and "short". 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 "full", "long", "medium", or "short". .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, "T" may be used for Tuesday and Thursday in the English narrow forms. .PP Many names also distinguish between "format" and "stand-alone" 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\->\fBid()\fR .Sp The locale's id. .IP \(bu 4 \&\f(CW$locale\fR\->\fBlanguage_id()\fR .Sp The language portion of the id. .IP \(bu 4 \&\f(CW$locale\fR\->\fBscript_id()\fR .Sp The script portion of the id, if any. .IP \(bu 4 \&\f(CW$locale\fR\->\fBterritory_id()\fR .Sp The territory portion of the id, if any. .IP \(bu 4 \&\f(CW$locale\fR\->\fBvariant_id()\fR .Sp The variant portion of the id, if any. .IP \(bu 4 \&\f(CW$locale\fR\->\fBname()\fR .Sp The full name for the locale in English. .IP \(bu 4 \&\f(CW$locale\fR\->\fBlanguage()\fR .Sp The language name for the locale in English. .IP \(bu 4 \&\f(CW$locale\fR\->\fBscript()\fR .Sp The script name for the locale in English, if any. .IP \(bu 4 \&\f(CW$locale\fR\->\fBterritory()\fR .Sp The territory name for the locale in English, if any. .IP \(bu 4 \&\f(CW$locale\fR\->\fBvariant()\fR .Sp The variant name for the locale in English, if any. .IP \(bu 4 \&\f(CW$locale\fR\->\fBnative_name()\fR .Sp The full name for the locale in its native language, if any. .IP \(bu 4 \&\f(CW$locale\fR\->\fBnative_language()\fR .Sp The language name for the locale in its native language, if any. .IP \(bu 4 \&\f(CW$locale\fR\->\fBnative_script()\fR .Sp The script name for the locale in its native language, if any. .IP \(bu 4 \&\f(CW$locale\fR\->\fBnative_territory()\fR .Sp The territory name for the locale in its native language, if any. .IP \(bu 4 \&\f(CW$locale\fR\->\fBnative_variant()\fR .Sp The variant name for the locale in its native language, if any. .IP \(bu 4 \&\f(CW$locale\fR\->\fBmonth_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\->\fBmonth_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\->\fBmonth_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\->\fBmonth_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\->\fBmonth_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\->\fBmonth_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\->\fBday_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\->\fBday_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\->\fBday_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\->\fBday_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\->\fBday_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\->\fBday_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\->\fBquarter_format_wide()\fR .Sp Returns an array reference containing the wide format names of the quarters. .IP \(bu 4 \&\f(CW$locale\fR\->\fBquarter_format_abbreviated()\fR .Sp Returns an array reference containing the abbreviated format names of the quarters. .IP \(bu 4 \&\f(CW$locale\fR\->\fBquarter_format_narrow()\fR .Sp Returns an array reference containing the narrow format names of the quarters. .IP \(bu 4 \&\f(CW$locale\fR\->\fBquarter_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\->\fBquarter_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\->\fBquarter_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\->\fBera_wide()\fR .Sp Returns an array reference containing the wide names of the eras, with "BCE" first. .IP \(bu 4 \&\f(CW$locale\fR\->\fBera_abbreviated()\fR .Sp Returns an array reference containing the abbreviated names of the eras, with "BCE" first. .IP \(bu 4 \&\f(CW$locale\fR\->\fBera_narrow()\fR .Sp Returns an array reference containing the abbreviated names of the eras, with "BCE" first. However, most locales do not differ between the narrow and abbreviated length of the era. .IP \(bu 4 \&\f(CW$locale\fR\->\fBam_pm_abbreviated()\fR .Sp Returns an array reference containing the abbreviated names of "AM" and "PM". .IP \(bu 4 \&\f(CW$locale\fR\->\fBdate_format_long()\fR .IP \(bu 4 \&\f(CW$locale\fR\->\fBdate_format_full()\fR .IP \(bu 4 \&\f(CW$locale\fR\->\fBdate_format_medium()\fR .IP \(bu 4 \&\f(CW$locale\fR\->\fBdate_format_short()\fR .Sp Returns the CLDR date pattern of the appropriate length. .IP \(bu 4 \&\f(CW$locale\fR\->\fBdate_formats()\fR .Sp Returns a hash reference of CLDR date patterns for the date formats, where the keys are "full", "long", "medium", and "short". .IP \(bu 4 \&\f(CW$locale\fR\->\fBtime_format_long()\fR .IP \(bu 4 \&\f(CW$locale\fR\->\fBtime_format_full()\fR .IP \(bu 4 \&\f(CW$locale\fR\->\fBtime_format_medium()\fR .IP \(bu 4 \&\f(CW$locale\fR\->\fBtime_format_short()\fR .Sp Returns the CLDR date pattern of the appropriate length. .IP \(bu 4 \&\f(CW$locale\fR\->\fBtime_formats()\fR .Sp Returns a hash reference of CLDR date patterns for the time formats, where the keys are "full", "long", "medium", and "short". .IP \(bu 4 \&\f(CW$locale\fR\->\fBdatetime_format_long()\fR .IP \(bu 4 \&\f(CW$locale\fR\->\fBdatetime_format_full()\fR .IP \(bu 4 \&\f(CW$locale\fR\->\fBdatetime_format_medium()\fR .IP \(bu 4 \&\f(CW$locale\fR\->\fBdatetime_format_short()\fR .Sp Returns the CLDR date pattern of the appropriate length. .IP \(bu 4 \&\f(CW$locale\fR\->\fBdatetime_formats()\fR .Sp Returns a hash reference of CLDR date patterns for the datetime formats, where the keys are "full", "long", "medium", and "short". .IP \(bu 4 \&\f(CW$locale\fR\->\fBdate_format_default()\fR .IP \(bu 4 \&\f(CW$locale\fR\->\fBtime_format_default()\fR .IP \(bu 4 \&\f(CW$locale\fR\->\fBdatetime_format_default()\fR .Sp Returns the default CLDR 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\->\fBdefault_date_format_length()\fR .IP \(bu 4 \&\f(CW$locale\fR\->\fBdefault_time_format_length()\fR .Sp Returns the default length for the format, one of "full", "long", "medium", or "short". .IP \(bu 4 \&\f(CW$locale\fR\->\fBset_default_date_format_length()\fR .IP \(bu 4 \&\f(CW$locale\fR\->\fBset_default_time_format_length()\fR .Sp Sets the default length for the format. This must be one of "full", "long", "medium", or "short". .IP \(bu 4 \&\f(CW$locale\fR\->\fBprefers_24_hour_time()\fR .Sp Returns a boolean indicating the preferred hour format for this locale. .IP \(bu 4 \&\f(CW$locale\fR\->\fBfirst_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 US locale this returns 7. .IP \(bu 4 \&\f(CW$locale\fR\->\fBavailable_formats()\fR .Sp A list of format names, like "MMdd" or "yyyyMM". 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 CLDR date pattern for that thing, if one exists. .SH SUPPORT .IX Header "SUPPORT" See DateTime::Locale. .PP Bugs may be submitted at . .PP There is a mailing list available for users of this distribution, . .SH SOURCE .IX Header "SOURCE" The source code repository for DateTime-Locale can be found at . .SH AUTHOR .IX Header "AUTHOR" Dave Rolsky .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2003 \- 2024 by Dave Rolsky. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. .PP The full text of the license can be found in the \&\fILICENSE\fR file included with this distribution.