.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) .\" .\" 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 "HTML::CalendarMonth::Locale 3pm" .TH HTML::CalendarMonth::Locale 3pm "2011-09-28" "perl v5.12.4" "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" HTML::CalendarMonth::Locale \- Front end class for DateTime::Locale .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use HTML::CalendarMonth::Locale; \& \& my $loc = HTML::CalendarMonth::Locale\->new( id => \*(Aqen_US\*(Aq ); \& \& # list of days of the week for locale \& my @days = $loc\->days; \& \& # list of months of the year for locale \& my @months = $loc\->months; \& \& # the name of the current locale, as supplied the id parameter to \& # new() \& my $locale_name = $loc\->id; \& \& # the actual DateTime::Locale object \& my $loc = $loc\->loc; \& \& 1; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" HTML::CalendarMonth utilizes the powerful locale capabilities of DateTime::Locale for rendering its calendars. The default locale is \&'en_US' but many others are available. To see this list, invoke the class method HTML::CalendarMonth::Locale\->\fIlocales()\fR which in turn invokes \fIDateTime::Locale::ids()\fR. .PP This module is mostly intended for internal usage within HTML::CalendarMonth, but some of its functionality may be of use for developers: .SH "METHODS" .IX Header "METHODS" .IP "\fInew()\fR" 4 .IX Item "new()" Constructor. Takes the following parameters: .IP "id" 4 .IX Item "id" Locale id, e.g. 'en_US'. .IP "full_days" 4 .IX Item "full_days" Specifies whether full day names or their abbreviations are desired. Default 0, use abbreviated days. .IP "full_months" 4 .IX Item "full_months" Specifies whether full month names or their abbreviations are desired. Default 1, use full months. .IP "\fIid()\fR" 4 .IX Item "id()" Returns the locale id used during object construction. .IP "\fIlocale()\fR" 4 .IX Item "locale()" Accessor method for the DateTime::Locale class, which in turn offers several class methods of specific interest. See DateTime::Locale. .IP "\fIlocale_map()\fR" 4 .IX Item "locale_map()" Returns a hash of all available locales, mapping their id to their full name. .IP "\fIloc()\fR" 4 .IX Item "loc()" Accessor method for the DateTime::Locale instance as specified by \f(CW\*(C`id\*(C'\fR. See DateTime::Locale. .IP "\fIlocales()\fR" 4 .IX Item "locales()" Lists all available locale ids. Equivalent to \fIlocale()\fR\->\fIids()\fR, or DateTime::Locale\->\fIids()\fR. .IP "\fIdays()\fR" 4 .IX Item "days()" Returns a list of days of the week, Sunday first. These are the actual unique day strings used for rendering calendars, so depending on which attributes were provided to \f(CW\*(C`new()\*(C'\fR, this list will either be abbreviations or full names. The default uses abbreviated day names. Returns a list in list context or an array ref in scalar context. .IP "\fInarrow_days()\fR" 4 .IX Item "narrow_days()" Returns a list of short day abbreviations, beginning with Sunday. The narrow abbreviations are not guaranteed to be unique (i.e. 'S' for both Sat and Sun). .IP "\fIdays_minmatch()\fR" 4 .IX Item "days_minmatch()" Provides a hash reference containing minimal case-insensitive match strings for each day of the week, e.g., 'sa' for Saturday, 'm' for Monday, etc. .IP "\fImonths()\fR" 4 .IX Item "months()" Returns a list of months of the year, beginning with January. Depending on which attributes were provided to \f(CW\*(C`new()\*(C'\fR, this list will either be full names or abbreviations. The default uses full names. Returns a list in list context or an array ref in scalar context. .IP "\fInarrow_months()\fR" 4 .IX Item "narrow_months()" Returns a list of short month abbreviations, beginning with January. The narrow abbreviations are not guaranteed to be unique. .IP "\fImonths_minmatch()\fR" 4 .IX Item "months_minmatch()" Provides a hash reference containing minimal case-insensitive match strings for each month of the year, e.g., 'n' for November, 'ja' for January, 'jul' for July, 'jun' for June, etc. .IP "\fIdaynums()\fR" 4 .IX Item "daynums()" Provides a hash reference containing day of week indices for each fully qualified day name as returned by \fIdays()\fR. .IP "daynum($day)" 4 .IX Item "daynum($day)" Provides the day of week index for a particular day name. .IP "dayname($day)" 4 .IX Item "dayname($day)" Provides the fully qualified day name for a given string or day index. .IP "\fImonthnums()\fR" 4 .IX Item "monthnums()" Provides a hash reference containing month of year indices for each fully qualified month name as returned by \fImonths()\fR. .IP "monthnum($month)" 4 .IX Item "monthnum($month)" Provides the month of year index for a particular month name. .IP "monthname($month)" 4 .IX Item "monthname($month)" Provides the month name for a given string or month index. .IP "minmatch_hash(@list)" 4 .IX Item "minmatch_hash(@list)" This is the method used to generate the case-insensitive minimal match hash referenced above. Given an arbitrary list, a hash reference will be returned with minimal match strings as keys and the original strings as values. .IP "lc_minmatch_hash(@list)" 4 .IX Item "lc_minmatch_hash(@list)" Same as minmatch_hash, except keys are forced to lower case. .IP "\fIfirst_day_of_week()\fR" 4 .IX Item "first_day_of_week()" Returns a number from 0 to 6 representing the first day of the week for this locale, where 0 represents Sunday. .SH "AUTHOR" .IX Header "AUTHOR" Matthew P. Sisk, <\fIsisk@mojotoad.com\fR> .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 2010 Matthew P. Sisk. All rights reserved. All wrongs revenged. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIHTML::CalendarMonth\fR\|(3), \fIDateTime::Locale\fR\|(3)