.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" 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" ''
.    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 "2019-11-05" "perl v5.30.0" "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
.SH "VERSION"
.IX Header "VERSION"
version 1.25
.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 \*(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\->\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
\&\*(L"\s-1BCE\*(R"\s0 first.
.IP "\(bu" 4
\&\f(CW$locale\fR\->\fBera_abbreviated()\fR
.Sp
Returns an array reference containing the abbreviated names of the
eras, with \*(L"\s-1BCE\*(R"\s0 first.
.IP "\(bu" 4
\&\f(CW$locale\fR\->\fBera_narrow()\fR
.Sp
Returns an array reference containing the abbreviated names of the
eras, with \*(L"\s-1BCE\*(R"\s0 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 \*(L"\s-1AM\*(R"\s0
and \*(L"\s-1PM\*(R".\s0
.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 \s-1CLDR\s0 date pattern of the appropriate length.
.IP "\(bu" 4
\&\f(CW$locale\fR\->\fBdate_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\->\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 \s-1CLDR\s0 date pattern of the appropriate length.
.IP "\(bu" 4
\&\f(CW$locale\fR\->\fBtime_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\->\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 \s-1CLDR\s0 date pattern of the appropriate length.
.IP "\(bu" 4
\&\f(CW$locale\fR\->\fBdatetime_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\->\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 \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\->\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 \*(L"full\*(R", \*(L"long\*(R",
\&\*(L"medium\*(R", or \*(L"short\*(R".
.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 \*(L"full\*(R",
\&\*(L"long\*(R", \*(L"medium\*(R", or \*(L"short\*(R".
.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 \s-1US\s0 locale this
returns 7.
.IP "\(bu" 4
\&\f(CW$locale\fR\->\fBavailable_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.
.PP
Bugs may be submitted at <https://github.com/houseabsolute/DateTime\-Locale/issues>.
.PP
There is a mailing list available for users of this distribution,
<mailto:datetime@perl.org>.
.PP
I am also usually active on \s-1IRC\s0 as 'autarch' on \f(CW\*(C`irc://irc.perl.org\*(C'\fR.
.SH "SOURCE"
.IX Header "SOURCE"
The source code repository for DateTime-Locale can be found at <https://github.com/houseabsolute/DateTime\-Locale>.
.SH "AUTHOR"
.IX Header "AUTHOR"
Dave Rolsky <autarch@urth.org>
.SH "COPYRIGHT AND LICENSE"
.IX Header "COPYRIGHT AND LICENSE"
This software is copyright (c) 2003 \- 2019 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
\&\fI\s-1LICENSE\s0\fR file included with this distribution.
