DateTime-Locale

 view release on metacpan or  search on metacpan

lib/DateTime/Locale/FromData.pm  view on Meta::CPAN


=head2 $locale->native_language

=head2 $locale->native_script

=head2 $locale->native_territory

=head2 $locale->native_variant

The relevant component from the locale's complete native name as a UTF-8
string.

=head2 $locale->month_format_wide

=head2 $locale->month_format_abbreviated

=head2 $locale->month_format_narrow

=head2 $locale->month_stand_alone_wide

=head2 $locale->month_stand_alone_abbreviated

=head2 $locale->month_stand_alone_narrow

=head2 $locale->day_format_wide

=head2 $locale->day_format_abbreviated

=head2 $locale->day_format_narrow

=head2 $locale->day_stand_alone_wide

=head2 $locale->day_stand_alone_abbreviated

=head2 $locale->day_stand_alone_narrow

=head2 $locale->quarter_format_wide

=head2 $locale->quarter_format_abbreviated

=head2 $locale->quarter_format_narrow

=head2 $locale->quarter_stand_alone_wide

=head2 $locale->quarter_stand_alone_abbreviated

=head2 $locale->quarter_stand_alone_narrow

=head2 $locale->am_pm_abbreviated

=head2 $locale->era_wide

=head2 $locale->era_abbreviated

=head2 $locale->era_narrow

These methods all return an array reference containing the specified data.

The methods with "format" in the name should return strings that can be used a
part of a string, like "the month of July". The stand alone values are for use
in things like calendars as opposed to a sentence.

The narrow forms may not be unique (for example, in the day column heading for
a calendar it's okay to have "T" for both Tuesday and Thursday).

The wide name should always be the full name of thing in question. The narrow
name should be just one or two characters.

B<These methods return a reference to the data stored in the locale object. If
you change this reference's contents, this will affect the data in the locale
object! You should clone the data first if you want to modify it.>

=head2 $locale->date_format_full

=head2 $locale->date_format_long

=head2 $locale->date_format_medium

=head2 $locale->date_format_short

=head2 $locale->time_format_full

=head2 $locale->time_format_long

=head2 $locale->time_format_medium

=head2 $locale->time_format_short

=head2 $locale->datetime_format_full

=head2 $locale->datetime_format_long

=head2 $locale->datetime_format_medium

=head2 $locale->datetime_format_short

These methods return strings appropriate for the C<< DateTime->format_cldr >>
method.

=head2 $locale->format_for($name)

These are accessed by passing a name to C<< $locale->format_for(...)  >>, where
the name is a CLDR-style format specifier.

The return value is a string suitable for passing to C<< $dt->format_cldr >>,
so you can do something like this:

  print $dt->format_cldr( $dt->locale->format_for('MMMdd') )

which for the "en" locale would print out something like "08 Jul".

Note that the localization may also include additional text specific to the
locale. For example, the "MMMMd" format for the "zh" locale includes the
Chinese characters for "day" (日) and month (月), so you get something like
"S<8月23日>".

=head2 $locale->available_formats

This should return a list of all the format names that could be passed to C<<
$locale->format_for >>.

See the documentation for individual locales for details and examples of these
formats. The format names that are available vary by locale.



( run in 0.739 second using v1.01-cache-2.11-cpan-39bf76dae61 )