1DateTime::Locale::Base(U3s)er Contributed Perl DocumentatDiaotneTime::Locale::Base(3)
2
3
4
6 DateTime::Locale::Base - Base class for individual locale objects
7
9 use base 'DateTime::Locale::Base';
10
12 Each locale has a set of four default date and time formats. They are
13 distinguished by length, and are called "full", "long", "medium", and
14 "short". Each locale may have a different default length which it uses
15 when its "default_date_format()", "default_time_format()", or
16 "default_datetime_format()" methods are called.
17
18 This can be changed by calling the "set_default_date_format()" or
19 "set_default_time_format()" methods. These methods accept a string
20 which must be one of "full", "long", "medium", or "short".
21
23 If you are writing a subclass of this class, then you must provide the
24 following methods:
25
26 * month_names
27 Returns an array reference containing the full names of the months,
28 with January as the first month.
29
30 * month_abbreviations
31 Returns an array reference containing the abbreviated names of the
32 months, with January as the first month.
33
34 * month_narrows
35 Returns an array reference containing the narrow names of the
36 months, with January as the first month. Narrow names are the
37 shortest possible names, and need not be unique.
38
39 * day_names
40 Returns an array reference containing the full names of the days,
41 with Monday as the first day.
42
43 * day_abbreviations
44 Returns an array reference containing the abbreviated names of the
45 days, with Monday as the first day.
46
47 * day_narrows
48 Returns an array reference containing the narrow names of the days,
49 with Monday as the first day. Narrow names are the shortest possiā
50 ble names, and need not be unique.
51
52 * am_pms
53 Returns an array reference containing the localized forms of "AM"
54 and "PM".
55
56 * era_abbreviations
57 Returns an array reference containing the localized forms of the
58 abbreviation for the eras, such as "BCE" and "CE".
59
60 * era_names
61 Returns an array reference containing the localized forms the name
62 of the eras, such as "Before Common Era" and "Common Era".
63
64 * long_date_format, full_date_format, medium_date_format,
65 short_date_format
66 Returns the date format of the appropriate length.
67
68 * long_time_format, full_time_format, medium_time_format,
69 short_time_format
70 Returns the date format of the appropriate length.
71
72 * date_before_time
73 This returns a boolean value indicating whether or not the date
74 comes before the time when formatting a complete date and time for
75 presentation.
76
77 * date_parts_order
78 This returns a string indicating the order of the parts of a date
79 that is in the form XX/YY/ZZ. The possible values are "dmy",
80 "mdy", "ydm" and "ymd".
81
82 * _default_date_format_length
83 This should return a string which is one of "long", "full",
84 "medium", or "short". It indicates the default date format length
85 for the locale.
86
87 * _default_time_format_length
88 This should return a string which is one of "long", "full",
89 "medium", or "short". It indicates the default time format length
90 for the locale.
91
93 Support for this module is provided via the datetime@perl.org email
94 list. See http://lists.perl.org/ for more details.
95
97 Richard Evans <rich@ridas.com>
98
99 Dave Rolsky <autarch@urth.org>
100
102 Copyright (c) 2003 Richard Evans. Copyright (c) 2004-2005 David Rolsky.
103 All rights reserved.
104
105 This program is free software; you can redistribute it and/or modify it
106 under the same terms as Perl itself.
107
108 The full text of the license can be found in the LICENSE file included
109 with this module.
110
111
112
113perl v5.8.8 2007-04-02 DateTime::Locale::Base(3)