view release on metacpan or search on metacpan
generalized_time.txt view on Meta::CPAN
MINUS = %x2D ; minus sign ("-")
The <DOT>, <COMMA>, and <PLUS> rules are defined in [RFC4512].
The above ABNF allows character strings that do not represent valid
dates (in the Gregorian calendar) and/or valid times (e.g., February
31, 1994). Such character strings SHOULD be considered invalid for
this syntax.
The time value represents coordinated universal time (equivalent to
Greenwich Mean Time) if the "Z" form of <g-time-zone> is used;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTime/Format/Unicode.pm view on Meta::CPAN
}
}
# NOTE: pattern U
# Missing in DateTime
# "If the calendar does not provide cyclic year name data, or if the year value to be formatted is out of the range of years for which cyclic name data is provided, then numeric formatting is used (behaves like 'y')."
sub _format_cyclic_year_name
{
my( $self, $token, $len, $dt ) = @_;
my $unicode = $self->{_unicode} || die( "DateTime::Locale::FromCLDR object is gone!" );
my $year = $dt->year;
lib/DateTime/Format/Unicode.pm view on Meta::CPAN
=item * C<b>
Period of the day, such as C<am>, C<pm>, C<noon>, C<midnight>
See L<Locale::Unicode::Data/calendar_term> and its corollary L<Locale::Unicode::Data/day_period>
=item * C<B>
Flexible day periods, such as C<at night>
See L<Locale::Unicode::Data/calendar_term> and its corollary L<Locale::Unicode::Data/day_period>
=item * C<O>
Zone, such as C<O> to get the short localized GMT format C<GMT-8>, or C<OOOO> to get the long localized GMT format C<GMT-08:00>
=item * C<r>
Related Gregorian year (numeric).
The documentation states that "For the Gregorian calendar, the ârâ year is the same as the âuâ year."
=item * C<U>
Cyclic year name. However, since this is for non gregorian calendars, like Chinese or Hindu calendars, and since L<DateTime> only supports gregorian calendar, we do not support it either.
=item * C<x>
Timezone, such as C<x> would be C<-08>, C<xx> C<-0800> or C<+0800>, C<xxx> would be C<-08:00> or C<+08:00>, C<xxxx> would be C<-0800> or C<+0000> and C<xxxxx> would be C<-08:00>, or C<-07:52:58> or C<+00:00>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTime/Incomplete.pm view on Meta::CPAN
A C<DateTime::Incomplete> object can have a "base" C<DateTime.pm>
object. This object is used as a default datetime in the
C<to_datetime()> method, and it also used to validate inputs to the
C<set()> method.
The base object must use the year/month/day system. Most calendars
use this system including Gregorian (C<DateTime>) and Julian. Note
that this module has not been well tested with base objects from
classes other than C<DateTime.pm> class.
By default, newly created C<DateTime::Incomplete> objects have no
lib/DateTime/Incomplete.pm view on Meta::CPAN
=item * from_object( object => $object, ... )
This class method can be used to construct a new
C<DateTime::Incomplete> object from any object that implements the
C<utc_rd_values()> method. All C<DateTime::Calendar> modules must
implement this method in order to provide cross-calendar
compatibility. This method accepts a "locale" parameter.
If the object passed to this method has a C<time_zone()> method, that
is used to set the time zone. Otherwise UTC is used.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTime/Calendar/HalariSamvata.pm view on Meta::CPAN
__END__
=head1 NAME
DateTime::Calendar::HalariSamvata - Halari/Kutchhi calendar.
=head1 VERSION
This documentation describes version 0.1 of this module.
lib/DateTime/Calendar/HalariSamvata.pm view on Meta::CPAN
tithi => 1,
);
=head1 ABSTRACT
A module that implements the ChandramAna (luni-solar) calendar used in some
Western parts of the Indian state of Gujarat.
=head1 DESCRIPTION
Note: In this document, Sanskrit words are transliterated using the ITRANS
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTime/Lite.pm view on Meta::CPAN
This string encodes the recurring DST rule for all dates beyond the last explicit transition. At runtime, C<DateTime::Lite::TimeZone> evaluates the footer rule via an XS implementation of the IANA C<tzcode> reference algorithm (see C<dtl_posix.h>, de...
=item XS-accelerated hot paths
The XS layer covers all CPU-intensive calendar arithmetic (C<_rd2ymd>, C<_ymd2rd>, C<_seconds_as_components>, all leap-second helpers), plus new functions not in the original: C<_rd_to_epoch>, C<_epoch_to_rd>, C<_normalize_nanoseconds>, and C<_compar...
=item Compatible API
The public API mirrors L<DateTime> as closely as possible, so existing code using C<DateTime> should work with C<DateTime::Lite> as a drop-in replacement.
lib/DateTime/Lite.pm view on Meta::CPAN
=head2 week_year
my $wy = $dt->week_year;
Returns the year that the ISO 8601 week belongs to. This may differ from L</year> for days near the start or end of the calendar year.
=head2 quarter
my $q = $dt->quarter;
lib/DateTime/Lite.pm view on Meta::CPAN
Subtracts a L<DateTime::Lite::Duration> object from the datetime in-place (mutates C<$self>). Equivalent to C<< $dt->add_duration( $dur->inverse ) >>.
=head2 subtract_datetime( $dt )
Returns a L<DateTime::Lite::Duration> representing the difference between two C<DateTime::Lite> objects (calendar-aware).
=head2 subtract_datetime_absolute( $dt )
Returns a L<DateTime::Lite::Duration> representing the absolute UTC difference in seconds/nanoseconds.
lib/DateTime/Lite.pm view on Meta::CPAN
=head2 delta_md( $dt )
my $dur = $dt1->delta_md( $dt2 );
Returns a L<DateTime::Lite::Duration> with C<months> and C<days> components (calendar-aware difference).
=head2 delta_ms( $dt )
my $dur = $dt1->delta_ms( $dt2 );
lib/DateTime/Lite.pm view on Meta::CPAN
Most patterns pad with leading zeroes when the specifier is longer than one character. For example, C<h> gives C<9> but C<hh> gives C<09>. The exception is that B<five> of a letter usually means the narrow form, such as C<EEEEE> gives C<T> for Thursd...
=head2 Format vs. stand-alone forms
Many tokens have a I<format> form (used inside a larger string) and a I<stand-alone> form (used alone, such as in a calendar header). They are distinguished by case: C<M> is format, C<L> is stand-alone for months; C<E>/C<e> is format, C<c> is stand-a...
=head2 Token reference
Era
G{1,3} abbreviated era (BC, AD)
lib/DateTime/Lite.pm view on Meta::CPAN
GGGGG narrow era
Year
y year, zero-padded as needed
yy two-digit year (special case)
Y{1,} week-of-year calendar year (from week_year)
u{1,} same as y, but yy is not special
Quarter
Q{1,2} quarter as number (1-4)
QQQ abbreviated format quarter
lib/DateTime/Lite.pm view on Meta::CPAN
);
say $fmt2->format_interval( $dt1, $dt2 ); # e.g. "Apr 9 - 12, 2026"
=head1 HOW DATETIME MATH WORKS
Date math in C<DateTime::Lite> follows the same model as L<DateTime>. The key distinction is between I<calendar units> (months, days) and I<clock units> (minutes, seconds, nanoseconds). Understanding this distinction is essential for correct results.
=head2 Duration buckets
A L<DateTime::Lite::Duration> stores its components in five independent I<buckets>: months, days, minutes, seconds, nanoseconds. Each bucket is kept as a signed integer. The buckets are B<not normalised> against each other: a duration of C<< { months...
=head2 Calendar vs. clock units
I<Calendar units> (months, days) are relative: their real duration depends on the datetime to which they are applied. I<Clock units> (minutes, seconds, nanoseconds) are absolute.
When L<add|/add> applies a duration, calendar units are applied first, then clock units:
$dt->add( months => 1, hours => 2 );
# Step 1: advance by 1 month (calendar)
# Step 2: advance by 2 hours (clock)
=head2 End-of-month handling
Adding months to a date whose day is beyond the end of the target month requires a policy decision. L<DateTime::Lite::Duration> supports three C<end_of_month> modes:
lib/DateTime/Lite.pm view on Meta::CPAN
=back
=head2 Subtraction
C<< $dt1->subtract_datetime( $dt2 ) >> returns a duration representing the difference. The calendar part is computed in months and days (from the local dates), and the clock part in seconds and nanoseconds (from the UTC representations). This is the ...
C<< $dt1->subtract_datetime_absolute( $dt2 ) >> returns a duration in pure clock units (seconds and nanoseconds), based on the UTC epoch difference. This is useful when you need an exact elapsed time independent of DST changes.
=head2 Leap seconds
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
use warnings;
sub new
{
my $this = shift( @_ );
my $self = bless( { calendar => 'gregorian' } => ( ref( $this ) || $this ) );
my $locale = shift( @_ ) ||
return( $self->error( "No locale was provided." ) );
$locale = $self->_locale_object( $locale ) ||
return( $self->pass_error );
my $core = $locale->core;
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
return( $self->pass_error );
}
}
}
$self->{locale} = $locale;
$self->{calendar} //= 'gregorian';
$self->{_cldr} = Locale::Unicode::Data->new ||
return( $self->pass_error( Locale::Unicode::Data->error ) );
return( $self );
}
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
{
my $locale = $self->{locale} || die( "Locale value is gone!" );
my $cldr = $self->{_cldr} || die( "The Locale::Unicode::Data object is gone!" );
my $tree = $cldr->make_inheritance_tree( $locale ) ||
return( $self->pass_error( $cldr->error ) );
my $calendar = $self->{calendar} || 'gregorian';
foreach my $loc ( @$tree )
{
my $all = $cldr->calendar_available_formats(
locale => $loc,
calendar => $calendar,
alt => undef,
# count might contain some value
);
return( $self->pass_error ) if( !defined( $all ) && $cldr->error );
if( $all && scalar( @$all ) )
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
{
my $locale = $self->{locale} || die( "Locale value is gone!" );
my $cldr = $self->{_cldr} || die( "The Locale::Unicode::Data object is gone!" );
my $tree = $cldr->make_inheritance_tree( $locale ) ||
return( $self->pass_error( $cldr->error ) );
my $calendar = $self->{calendar} || 'gregorian';
foreach my $loc ( @$tree )
{
my $all = $cldr->calendar_available_formats(
locale => $loc,
calendar => $calendar,
alt => undef,
# count might contain some value
);
return( $self->pass_error ) if( !defined( $all ) && $cldr->error );
if( $all && scalar( @$all ) )
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
$self->{available_format_patterns} = $ref;
}
return( $ref );
}
sub calendar
{
my $self = shift( @_ );
if( @_ )
{
my $cal_id = shift( @_ );
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
{
return( $self->error( "Calendar ID provided (", ( $cal_id // 'undef' ), ") is invalid." ) );
}
$cal_id = lc( $cal_id );
}
$self->{calendar} = $cal_id;
}
return( $self->{calendar} );
}
sub code { return( shift->{locale} ); }
sub date_at_time_format_full { return( shift->_datetime_format(
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
sub datetime_format_short { return( shift->_datetime_format(
type => 'standard',
width => 'short',
) ); }
sub day_format_abbreviated { return( shift->_calendar_terms(
id => 'day_format_abbreviated',
type => 'day',
context => [qw( format stand-alone )],
width => [qw( abbreviated wide )],
) ); }
sub day_format_narrow { return( shift->_calendar_terms(
id => 'day_format_narrow',
type => 'day',
context => [qw( format stand-alone )],
width => [qw( narrow short abbreviated wide )],
) ); }
# NOTE: day short exists in CLDR, but is left out in DateTime::Locale::FromData
sub day_format_short { return( shift->_calendar_terms(
id => 'day_format_short',
type => 'day',
context => [qw( format stand-alone )],
width => [qw( short narrow abbreviated )],
) ); }
sub day_format_wide { return( shift->_calendar_terms(
id => 'day_format_wide',
type => 'day',
context => [qw( format stand-alone )],
width => 'wide',
) ); }
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
}
}
return( $periods );
}
sub day_stand_alone_abbreviated { return( shift->_calendar_terms(
id => 'day_stand_alone_abbreviated',
type => 'day',
context => [qw( stand-alone format )],
width => [qw( abbreviated wide )],
) ); }
sub day_stand_alone_narrow { return( shift->_calendar_terms(
id => 'day_stand_alone_narrow',
type => 'day',
context => [qw( stand-alone format )],
width => [qw( narrow wide )],
) ); }
# NOTE: day short exists in CLDR, but is left out in DateTime::Locale::FromData
sub day_stand_alone_short { return( shift->_calendar_terms(
id => 'day_stand_alone_short',
type => 'day',
context => [qw( stand-alone format )],
width => [qw( short abbreviated )],
) ); }
sub day_stand_alone_wide { return( shift->_calendar_terms(
id => 'day_stand_alone_wide',
type => 'day',
context => [qw( stand-alone format )],
width => 'wide',
) ); }
sub default_date_format_length { return( shift->{default_date_format_length} ); }
sub default_time_format_length { return( shift->{default_time_format_length} ); }
sub era_abbreviated { return( shift->_calendar_eras(
id => 'era_abbreviated',
width => [qw( abbreviated wide )],
alt => undef,
) ); }
sub era_narrow { return( shift->_calendar_eras(
id => 'era_narrow',
width => [qw( narrow abbreviated wide )],
alt => undef,
) ); }
sub era_wide { return( shift->_calendar_eras(
id => 'era_wide',
width => [qw( wide abbreviated )],
alt => undef,
) ); }
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
}
$locale = $self->_locale_object( $locale ) ||
return( $self->pass_error );
my $cldr = $self->{_cldr} ||
return( $self->error( "Unable to get the Locale::Unicode::Data object!" ) );
my $calendar = $self->{calendar} || 'gregorian';
my $tree = $cldr->make_inheritance_tree( $locale ) ||
return( $self->pass_error( $cldr->error ) );
my $ref;
foreach my $loc ( @$tree )
{
$ref = $cldr->calendar_interval_format(
locale => $loc,
calendar => $calendar,
format_id => $id,
greatest_diff_id => ( lc( $greatest_diff ) eq 'h' ? [ uc( $greatest_diff ), lc( $greatest_diff )] : $greatest_diff ),
);
if( !defined( $ref ) && $cldr->error )
{
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
return( $self->error( "No locale is set!" ) );
$locale = $self->_locale_object( $locale ) ||
return( $self->pass_error );
my $cldr = $self->{_cldr} ||
return( $self->error( "Unable to get the Locale::Unicode::Data object!" ) );
my $calendar = $self->{calendar} || 'gregorian';
my $tree = $cldr->make_inheritance_tree( $locale ) ||
return( $self->pass_error( $cldr->error ) );
foreach my $loc ( @$tree )
{
$formats = $cldr->interval_formats(
locale => $loc,
calendar => $calendar,
) || return( $self->pass_error( $cldr->error ) );
if( !defined( $formats ) && $cldr->error )
{
return( $self->pass_error( $cldr->error ) );
}
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
width => 'short',
}, @_ ) ); }
# NOTE: "if the abbreviated format data for Gregorian does not exist in a language X (in the chain up to root), then it inherits from the wide format data in that same language X."
# <https://unicode.org/reports/tr35/tr35-dates.html#months_days_quarters_eras>
sub month_format_abbreviated { return( shift->_calendar_terms(
id => 'month_format_abbreviated',
type => 'month',
context => 'format',
width => [qw( abbreviated wide )],
) ); }
sub month_format_narrow { return( shift->_calendar_terms(
id => 'month_format_narrow',
type => 'month',
context => 'format',
width => [qw( narrow wide )],
) ); }
# NOTE: There is no 'short' format for month, but there is for 'day'
sub month_format_wide { return( shift->_calendar_terms(
id => 'month_format_wide',
type => 'month',
context => 'format',
width => 'wide',
) ); }
sub month_stand_alone_abbreviated { return( shift->_calendar_terms(
id => 'month_stand_alone_abbreviated',
type => 'month',
context => 'stand-alone',
width => [qw( abbreviated wide )],
) ); }
sub month_stand_alone_narrow { return( shift->_calendar_terms(
id => 'month_stand_alone_narrow',
type => 'month',
context => 'stand-alone',
width => [qw( narrow wide )],
) ); }
# NOTE: There is no 'short' stand-alone for month, but there is for 'day'
sub month_stand_alone_wide { return( shift->_calendar_terms(
id => 'month_stand_alone_narrow',
type => 'month',
context => 'stand-alone',
width => 'wide',
) ); }
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
# 'h': 1-12
# 'K': 0-11
return( ( $pref eq 'H' || $pref eq 'k' ) ? 1 : 0 );
}
sub quarter_format_abbreviated { return( shift->_calendar_terms(
id => 'quarter_format_abbreviated',
type => 'quarter',
context => [qw( format stand-alone )],
width => [qw( abbreviated wide )],
) ); }
sub quarter_format_narrow { return( shift->_calendar_terms(
id => 'quarter_format_narrow',
type => 'quarter',
context => [qw( format stand-alone )],
width => [qw( narrow wide )],
) ); }
# NOTE: There is no 'short' format for quarter, but there is for 'day'
sub quarter_format_wide { return( shift->_calendar_terms(
id => 'quarter_format_wide',
type => 'quarter',
context => [qw( format stand-alone )],
width => 'wide',
) ); }
sub quarter_stand_alone_abbreviated { return( shift->_calendar_terms(
id => 'quarter_stand_alone_abbreviated',
type => 'quarter',
context => [qw( stand-alone format )],
width => [qw( abbreviated wide )],
) ); }
sub quarter_stand_alone_narrow { return( shift->_calendar_terms(
id => 'quarter_stand_alone_narrow',
type => 'quarter',
context => [qw( stand-alone format )],
width => [qw( narrow abbreviated wide )],
) ); }
# NOTE: There is no 'short' stand-alone for quarter, but there is for 'day'
sub quarter_stand_alone_wide { return( shift->_calendar_terms(
id => 'quarter_stand_alone_narrow',
type => 'quarter',
context => [qw( stand-alone format )],
width => 'wide',
) ); }
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
sub time_format_allowed { return( shift->_time_formats( 'allowed', @_ ) ); }
sub time_format_default { return( shift->time_format_medium ); }
sub time_format_full { return( shift->_date_time_format(
calendar => 'gregorian',
type => 'time',
width => 'full',
) ); }
sub time_format_long { return( shift->_date_time_format(
calendar => 'gregorian',
type => 'time',
width => 'long',
) ); }
sub time_format_medium { return( shift->_date_time_format(
calendar => 'gregorian',
type => 'time',
width => 'medium',
) ); }
sub time_format_preferred { return( shift->_time_formats( 'preferred', @_ ) ); }
sub time_format_short { return( shift->_date_time_format(
calendar => 'gregorian',
type => 'time',
width => 'short',
) ); }
sub time_formats
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
}
elsif( ref( $opts->{width} ) && ref( $opts->{width} ) ne 'ARRAY' && !overload::Method( $opts->{width} => '""' ) )
{
return( $self->error( "Width provided (", overload::StrVal( $opts->{width} ), ") is a reference that does not stringify!" ) );
}
elsif( $opts->{calendar} && ref( $opts->{calendar} ) && !overload::Method( $opts->{calendar} => '""' ) )
{
return( $self->error( "Calendar provided (", overload::StrVal( $opts->{calendar} ), ") is a reference that does not stringify!" ) );
}
my $calendar = $opts->{calendar} || $self->{calendar} || 'gregorian';
my $meth_id = 'am_pm_' . $calendar . '_' . $opts->{width} . '_' . $opts->{context};
my $ampm;
unless( defined( $ampm = $self->{ $meth_id } ) )
{
my $locale = $self->{locale} || die( "Locale value is gone!" );
my $cldr = $self->{_cldr} || die( "The Locale::Unicode::Data object is gone!" );
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
{
foreach my $context ( @$contexts )
{
foreach my $width ( @$widths )
{
my $all = $cldr->calendar_term(
locale => $loc,
calendar => $calendar,
term_context => $context,
term_width => $width,
term_name => [qw( am pm )],
);
return( $self->pass_error ) if( !defined( $all ) );
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
}
elsif( ref( $opts->{id} ) && !overload::Method( $opts->{id} => '""' ) )
{
return( $self->error( "Format ID provided (", overload::StrVal( $opts->{id} ), ") is a reference that does not stringify!" ) );
}
elsif( $opts->{calendar} && ref( $opts->{calendar} ) && !overload::Method( $opts->{calendar} => '""' ) )
{
return( $self->error( "Calendar provided (", overload::StrVal( $opts->{calendar} ), ") is a reference that does not stringify!" ) );
}
my $calendar = $opts->{calendar} || $self->{calendar} || 'gregorian';
my $meth_id = 'available_formats_' . $calendar . '_' . $opts->{id};
my $pattern;
unless( defined( $pattern = $self->{ $meth_id } ) )
{
my $locale = $self->{locale} || die( "Locale value is gone!" );
my $cldr = $self->{_cldr} || die( "Locale::Unicode::Data object is gone!" );
my $tree = $cldr->make_inheritance_tree( $locale ) ||
return( $self->pass_error( $cldr->error ) );
my $ref;
LOCALE: foreach my $loc ( @$tree )
{
$ref = $cldr->calendar_available_format(
locale => $loc,
calendar => $calendar,
format_id => $opts->{id},
count => [undef, qw( few many one other two zero)],
);
return( $self->pass_error ) if( !defined( $ref ) && $cldr->error );
if( $ref && $ref->{format_pattern} )
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
$self->{ $meth_id } = $pattern;
}
return( $pattern );
}
sub _calendar_eras
{
my $self = shift( @_ );
my $opts = $self->_get_args_as_hash( @_ );
my $id = $opts->{id} || die( "Missing ID" );
die( "Missing width" ) if( !$opts->{width} );
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
}
elsif( ref( $opts->{width} ) && ref( $opts->{width} ) ne 'ARRAY' && !overload::Method( $opts->{width} => '""' ) )
{
return( $self->error( "Width provided (", overload::StrVal( $opts->{width} ), ") is a reference that does not stringify!" ) );
}
elsif( $opts->{calendar} && ref( $opts->{calendar} ) && !overload::Method( $opts->{calendar} => '""' ) )
{
return( $self->error( "Calendar provided (", overload::StrVal( $opts->{calendar} ), ") is a reference that does not stringify!" ) );
}
my $calendar = $opts->{calendar} || $self->{calendar} || 'gregorian';
$opts->{width} = [$opts->{width}] unless( ref( $opts->{width} ) eq 'ARRAY' );
my $eras;
unless( defined( $eras = $self->{ "${id}_${calendar}" } ) )
{
my $locale = $self->{locale} || die( "Locale value is gone!" );
my $cldr = $self->{_cldr} || die( "Locale::Unicode::Data object is gone!" );
my $tree = $cldr->make_inheritance_tree( $locale ) ||
return( $self->pass_error( $cldr->error ) );
$eras = [];
LOCALE: foreach my $loc ( @$tree )
{
foreach my $width ( @{$opts->{width}} )
{
my $all = $cldr->calendar_eras_l10n(
locale => $loc,
calendar => $calendar,
era_width => $width,
( exists( $opts->{alt} ) ? ( alt => $opts->{alt} ) : () ),
order => [era_id => 'integer'],
);
return( $self->pass_error( $cldr->error ) ) if( !defined( $all ) && $cldr->error );
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
$self->{ $id } = $eras;
}
return( $eras );
}
sub _calendar_terms
{
my $self = shift( @_ );
my $opts = $self->_get_args_as_hash( @_ );
my $id = $opts->{id} || die( "Missing ID" );
die( "Missing type" ) if( !$opts->{type} );
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
}
elsif( ref( $opts->{width} ) && ref( $opts->{width} ) ne 'ARRAY' && !overload::Method( $opts->{width} => '""' ) )
{
return( $self->error( "Width provided (", overload::StrVal( $opts->{width} ), ") is a reference that does not stringify!" ) );
}
elsif( $opts->{calendar} && ref( $opts->{calendar} ) && !overload::Method( $opts->{calendar} => '""' ) )
{
return( $self->error( "Calendar provided (", overload::StrVal( $opts->{calendar} ), ") is a reference that does not stringify!" ) );
}
my $calendar = $opts->{calendar} || $self->{calendar} || 'gregorian';
$opts->{width} = [$opts->{width}] unless( ref( $opts->{width} ) eq 'ARRAY' );
# If some type (e.g. short, narrow, etc) are missing in 'format', we can try to look for it in 'stand-alone'
$opts->{context} = [$opts->{context}] unless( ref( $opts->{context} ) eq 'ARRAY' );
my $meth_id = "${id}_${calendar}_type=$opts->{type}_context=" . join( ';', @{$opts->{context}} ) . '_width=' . join( ';', @{$opts->{width}} );
my $terms;
unless( defined( $terms = $self->{ $meth_id } ) )
{
my $locale = $self->{locale} || die( "Locale value is gone!" );
my $cldr = $self->{_cldr} || die( "Locale::Unicode::Data object is gone!" );
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
{
foreach my $ctx ( @{$opts->{context}} )
{
foreach my $width ( @{$opts->{width}} )
{
my $all = $cldr->calendar_terms(
locale => $loc,
calendar => $calendar,
term_type => $opts->{type},
term_context => $ctx,
term_width => $width,
( $opts->{type} eq 'day' ? ( order_by_value => [term_name => [qw( mon tue wed thu fri sat sun )]] ) : () ),
( ( $opts->{type} eq 'month' || $opts->{type} eq 'quarter' ) ? ( order => [term_name => 'integer'] ) : () ),
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
}
elsif( ref( $opts->{width} ) && ref( $opts->{width} ) ne 'ARRAY' && !overload::Method( $opts->{width} => '""' ) )
{
return( $self->error( "Width provided (", overload::StrVal( $opts->{width} ), ") is a reference that does not stringify!" ) );
}
elsif( $opts->{calendar} && ref( $opts->{calendar} ) && !overload::Method( $opts->{calendar} => '""' ) )
{
return( $self->error( "Calendar provided (", overload::StrVal( $opts->{calendar} ), ") is a reference that does not stringify!" ) );
}
my $widths = ref( $opts->{width} ) eq 'ARRAY' ? $opts->{width} : [$opts->{width}];
my $calendar = $opts->{calendar} || $self->{calendar} || 'gregorian';
my $meth_id = '_date_time_format_' . $opts->{type} . '_format_' . $calendar . '_' . $widths->[0];
my $pattern;
unless( defined( $pattern = $self->{ $meth_id } ) )
{
my $locale = $self->{locale} || die( "Locale value is gone!" );
my $cldr = $self->{_cldr} || die( "Locale::Unicode::Data object is gone!" );
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
my $ref;
LOCALE: foreach my $loc ( @$locales )
{
foreach my $width ( @$widths )
{
$ref = $cldr->calendar_format_l10n(
locale => $loc,
calendar => $calendar,
format_type => $opts->{type},
format_length => $width,
);
return( $self->pass_error ) if( !defined( $ref ) && $cldr->error );
if( $ref && $ref->{format_pattern} )
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
elsif( $opts->{type} ne 'atTime' &&
$opts->{type} ne 'standard' )
{
die( "Invalid type provided. Please specify either 'atTime' or 'standard'" );
}
elsif( $opts->{calendar} && ref( $opts->{calendar} ) && !overload::Method( $opts->{calendar} => '""' ) )
{
return( $self->error( "Calendar provided (", overload::StrVal( $opts->{calendar} ), ") is a reference that does not stringify!" ) );
}
my $calendar = $opts->{calendar} || $self->{calendar} || 'gregorian';
my $meth_id = "_datetime_format_" . $calendar . '_' . $opts->{width} . '_' . $opts->{type};
my $pattern;
unless( defined( $pattern = $self->{ $meth_id } ) )
{
my $locale = $self->{locale} || die( "Locale value is gone!" );
my $cldr = $self->{_cldr} || die( "Locale::Unicode::Data object is gone!" );
my $locales = $cldr->make_inheritance_tree( $locale ) ||
return( $self->pass_error( $cldr->error ) );
my $ref;
LOCALE: foreach my $loc ( @$locales )
{
$ref = $cldr->calendar_datetime_format(
locale => $loc,
calendar => $calendar,
format_type => $opts->{type},
format_length => $opts->{width},
);
return( $self->pass_error ) if( !defined( $ref ) && $cldr->error );
if( $ref && $ref->{format_pattern} )
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
return( $self->pass_error );
my $locale = $self->{locale} ||
return( $self->error( "The local value is gone!" ) );
my $cldr = $self->{_cldr} ||
return( $self->error( "The Locale::Unicode::Data object is gone!" ) );
if( $opts->{calendar} && ref( $opts->{calendar} ) && !overload::Method( $opts->{calendar} => '""' ) )
{
return( $self->error( "Calendar provided (", overload::StrVal( $opts->{calendar} ), ") is a reference that does not stringify!" ) );
}
my $calendar = $opts->{calendar} || $self->{calendar} || 'gregorian';
die( "No 'context' argument was provided." ) if( !exists( $def->{context} ) );
die( "No 'width' argument was provided." ) if( !exists( $def->{width} ) );
if( ref( $def->{context} ) && ref( $def->{context} ) ne 'ARRAY' && !overload::Method( $def->{context} => '""' ) )
{
return( $self->error( "Context provided (", overload::StrVal( $def->{context} ), ") is a reference that does not stringify!" ) );
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
my $name;
LOCALE: foreach my $loc ( @$tree )
{
foreach my $width ( @$width )
{
my $ref = $cldr->calendar_term(
locale => $loc,
calendar => $calendar,
term_context => $def->{context},
term_width => $width,
term_name => $period,
);
if( !defined( $ref ) && $cldr->error )
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
sub FREEZE
{
my $self = CORE::shift( @_ );
my $serialiser = CORE::shift( @_ ) // '';
my $class = CORE::ref( $self );
my @keys = qw( locale calendar default_date_format_length default_time_format_length fatal );
my %hash = ();
@hash{ @keys } = @$self{ @keys };
# Return an array reference rather than a list so this works with Sereal and CBOR
# On or before Sereal version 4.023, Sereal did not support multiple values returned
CORE::return( [$class, %hash] ) if( $serialiser eq 'Sereal' && Sereal::Encoder->VERSION <= version->parse( '4.023' ) );
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
=head1 SYNOPSIS
use DateTime::Locale::FromCLDR;
my $locale = DateTime::Locale::FromCLDR->new( 'ja-Kana-JP' ) ||
die( DateTime::Locale::FromCLDR->error );
my $locale = DateTime::Locale::FromCLDR->new( 'ja-Kana-JP', calendar => 'japanese' ) ||
die( DateTime::Locale::FromCLDR->error );
my $array = $locale->am_pm_abbreviated;
my $array = $locale->available_formats;
$locale->calendar( 'hebrew' );
my $str = $locale->calendar;
# a Locale::Unicode object that stringifies to the initial locale value (ja-Kana-JP)
my $obj = $locale->code;
my $str = $locale->date_at_time_format_full;
my $str = $locale->date_at_time_format_long;
my $str = $locale->date_at_time_format_medium;
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
use Locale::Unicode;
my $loc = Locale::Unicode->new( 'fr-FR' );
my $locale = DateTime::Locale::FromCLDR->new( $loc ) ||
die( DateTime::Locale::FromCLDR->error );
Specifying a calendar ID other than the default C<gregorian>:
my $locale = DateTime::Locale::FromCLDR->new( 'ja-JP', calendar => 'japanese' ) ||
die( DateTime::Locale::FromCLDR->error );
or, using an hash reference:
my $locale = DateTime::Locale::FromCLDR->new( 'ja-JP', { calendar => 'japanese' } ) ||
die( DateTime::Locale::FromCLDR->error );
Instantiate a new L<DateTime::Locale::FromCLDR> object based on a C<locale> provided, and returns it. By default, it uses the calendar C<gregorian>, but you can specify a different one with the C<calendar> option.
You can provide any C<locale>, even complex one as shown above, and only its core part will be retained. So, for example:
my $locale = DateTime::Locale::FromCLDR->new( 'ryu-Kana-JP-t-de-t0-und-x0-medical' ) ||
die( DateTime::Locale::FromCLDR->error );
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
my $locale = DateTime::Locale::FromCLDR->new( 'fr' );
my $ampm = $locale->am_pm_abbreviated
say @$ampm; # Empty
See L<Locale::Unicode::Data/calendar_term>
=head2 am_pm_format_narrow
Same as L<am_pm_format_abbreviated|/am_pm_format_abbreviated>, but returns the narrow format of the AM/PM terms.
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
my $locale = DateTime::Locale::FromCLDR->new( 'en' );
my $array = $locale->available_formats;
Returns an array reference of all the format ID available for this C<locale>
See L<Locale::Unicode::Data/calendar_available_format>
=head2 available_format_patterns
my $locale = DateTime::Locale::FromCLDR->new( 'en' );
my $ref = $locale->available_format_patterns;
Returns an hash reference of all the available format ID to their corresponding pattern for the C<locale>
See L<Locale::Unicode::Data/calendar_available_format>
=head2 calendar
my $locale = DateTime::Locale::FromCLDR->new( 'ja-Kana-JP', calendar => 'japanese' ) ||
die( DateTime::Locale::FromCLDR->error );
my $str = $locale->calendar; # japanese
$locale->calendar( 'gregorian' );
Sets or gets the L<calendar ID|Locale::Unicode::Data/calendar> used to perform queries along with the given C<locale>
=head2 code
my $obj = $locale->code;
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
# EEEE, MMMM d, y
# Tuesday, July 23, 2024
Returns the L<full date pattern|https://unicode.org/reports/tr35/tr35-dates.html#dateFormats>
See also L<Locale::Unicode::Data/calendar_format_l10n>
=head2 date_format_long
Same as L<date_format_full|/date_format_full>, but returns the long format pattern.
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
# EEEE, MMMM d, y, h:mm:ssâ¯a zzzz
# Tuesday, July 23, 2024, 1:53:27â¯AM UTC
Returns the L<full datetime pattern|https://unicode.org/reports/tr35/tr35-dates.html#dateTimeFormats>
See also L<Locale::Unicode::Data/calendar_datetime_format>
=head2 datetime_format_long
Same as L<datetime_format_full|/datetime_format_full>, but returns the long format pattern.
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
say @$days;
# Mon, Tue, Wed, Thu, Fri, Sat, Sun
Returns an array reference of week day names abbreviated format with Monday first and Sunday last.
See also L<Locale::Unicode::Data/calendar_term>
=head2 day_format_narrow
Same as L<day_format_abbreviated|/day_format_abbreviated>, but returns the narrow format days.
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
If nothing relevant could be found somehow, this will return an empty string. C<undef> is returned only if an error occurred.
This is used to provide the relevant value for the token C<B> or C<b> in the L<Unicode LDML format patterns|Locale::Unicode::Data/"Format Patterns">
See also L<Locale::Unicode::Data/calendar_term>, L<Locale::Unicode::Data/day_period> and L<DateTime::Format::Unicode>
=head2 day_period_format_narrow
Same as L<day_period_format_abbreviated|/day_period_format_abbreviated>, but returns the narrow format of day period.
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
If nothing relevant could be found somehow, this will return an empty string. C<undef> is returned only if an error occurred.
This is used to provide a stand-alone word that can be used as a title, or in a different context.
See also L<Locale::Unicode::Data/calendar_term>, L<Locale::Unicode::Data/day_period> and L<DateTime::Format::Unicode>
=head2 day_period_stand_alone_narrow
Same as L<day_period_stand_alone_abbreviated|/day_period_stand_alone_abbreviated>, but returns the narrow stand-alone version of the day period.
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
say @$array;
# BC, AD
Returns an array reference of era names in abbreviated format.
See also L<Locale::Unicode::Data/calendar_eras_l10n>
=head2 era_narrow
Same as L<era_abbreviated|/era_abbreviated>, but returns the narrow format eras.
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
my $now = DateTime->now( locale => "en", time_zone => "Asia/Tokyo" );
# Assuming $now = 2024-07-23T21:39:39
say $now->format_cldr( 'h:mm B' );
# 9:39 B
But C<B> is the day period, which can be looked up with L<Locale::Unicode::Data/day_period>, which provides us with the day period token C<night1>, which itself can be looked up with L<Locale::Unicode::Data/calendar_term> and gives us the localised s...
You can use L<DateTime::Format::Unicode> instead of the default L<DateTime> C<CLDR> formatting if you want to get better support for all L<CLDR pattern tokens|Locale::Unicode::Data/"Format Patterns">.
With Japanese:
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
Provided with 2 L<DateTime objects|DateTime>, and this will compute the L<greatest difference|https://unicode.org/reports/tr35/tr35-dates.html#intervalFormats>.
Quoting from the L<LDML specifications|https://unicode.org/reports/tr35/tr35-dates.html#intervalFormats>:
"The data supplied in CLDR requires the software to determine the calendar field with the greatest difference before using the format pattern. For example, the greatest difference in "Jan 10-12, 2008" is the day field, while the greatest difference i...
If both C<DateTime> objects are identical, this will return an empty string.
You can alter the inner working of the algorithm by providing the option C<day_period_first> with a true value. This will prioritise the day period over the AM/PM (morning vs afternoon). What this means, is that if you have two datetimes, one with an...
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
say @$array;
# Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec
Returns an array reference of month names in abbreviated format from January to December.
See also L<Locale::Unicode::Data/calendar_term>
=head2 month_format_narrow
Same as L<month_format_abbreviated|/month_format_abbreviated>, but returns the months in narrow format.
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
say @$array;
# Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec
Returns an array reference of month names in abbreviated stand-alone format from January to December.
See also L<Locale::Unicode::Data/calendar_term>
Note that there is often little difference between the C<format> and C<stand-alone> format types.
See the L<LDML specifications|https://unicode.org/reports/tr35/tr35-dates.html#months_days_quarters_eras> for more information on the difference between the C<format> and C<stand-alone> types.
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
say @$array;
# Q1, Q2, Q3, Q4
Returns an array reference of quarter names in abbreviated format.
See also L<Locale::Unicode::Data/calendar_term>
=head2 quarter_format_narrow
Same as L<quarter_format_abbreviated|/quarter_format_abbreviated>, but returns the quarters in narrow format.
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
say @$array;
# Q1, Q2, Q3, Q4
Returns an array reference of quarter names in abbreviated format.
See also L<Locale::Unicode::Data/calendar_term>
Note that there is often little difference between the C<format> and C<stand-alone> format types.
See the L<LDML specifications|https://unicode.org/reports/tr35/tr35-dates.html#months_days_quarters_eras> for more information on the difference between the C<format> and C<stand-alone> types.
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
my $ref = $locale->territory_info;
which would yield:
{
calendars => undef,
contains => undef,
currency => "USD",
first_day => 7,
gdp => 19490000000000,
languages => [qw(
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
my $ref = $locale->territory_info;
which would yield:
{
calendars => undef,
contains => undef,
currency => "GBP",
first_day => 1,
gdp => 2925000000000,
languages => [qw(
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
weekend => undef,
}
Returns an hash reference of information related to the ISO3166 country code associated with the C<locale>. If the C<locale> has no country code associated, it will expand it using the Unicode LDML rule with L<Locale::Unicode::Data/likely_subtag>
Keep in mind that the default or fallback data are stored in the special territory code C<001> (World). Thus, for example, if the C<calendars> field is empty, the default value would be in C<001>, and would be C<["gregorian"]>
=head2 time_format_allowed
my $locale = DateTime::Locale::FromCLDR->new( 'en' );
my $array = $locale->time_format_allowed;
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
# h:mm:ssâ¯a zzzz
# 10:44:07â¯PM UTC
Returns the L<full date pattern|https://unicode.org/reports/tr35/tr35-dates.html#dateFormats>
See also L<Locale::Unicode::Data/calendar_format_l10n>
=head2 time_format_long
Same as L<time_format_full|/time_format_full>, but returns the long format pattern.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTime/Locale/Base.pm view on Meta::CPAN
in the English narrow forms.
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.
=head1 METHODS
All locales provide the following methods:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTime/Moonpig.pm view on Meta::CPAN
$z0 = $x0 - $birthday; # 10
is actually returning the result of C<< $x0->interval_factory(10) >>, which is 10.
=head3 Absolute time, not calendar time
C<DateTime::Moonpig> C<plus> and C<minus> always do real-time calculations, never civil
calendar calculations. If your locality began observing daylight
savings on 2007-03-11, as most of the USA did, then:
$a_day = DateTime::Moonpig->new( year => 2007,
month => 3,
day => 11,
lib/DateTime/Moonpig.pm view on Meta::CPAN
time_zone => "America/New_York",
);
$next_day = $a_day->plus(24*3600);
At this point C<$next_day> is exactly 24E<middot>3600 seconds ahead
of C<$a_day>. Because the civil calendar day for 2007-03-11 in New
York was only 23 hours long, C<$next_day> represents represents
2007-03-12 02:00:00 instead of 2007-03-12 01:00:00. This should be what you
expect; if not please correct your expectation.
=head2 NEW METHODS
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTime/Precise.pm view on Meta::CPAN
The purpose of this library was to replace our dependence on Unix
epoch time, which, being limited to a range of about 1970 to 2030, is
inadequate for our purposes (we have data as old as 1870). This date
library effectively handles dates from A.D. 1000 to infinity, and
would probably work all the way back to 0 (ignoring, of course, the
switch-over to the Gregorian calendar). The useful features of Unix
epoch time (ease of date difference calculation and date comparison,
strict ordering) are preserved, and elements such as human-legibility
are added. The library handles fractional seconds and some date/time
manipulations used for the Global Positioning Satellite system.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTime/TimeZone/SystemV.pm view on Meta::CPAN
in each case at 01:00 UT.
=item EST-10EST,M10.5.0,M3.5.0/3
Australian Eastern timezone, from 2007 onwards. 10 hours ahead of UT in
the southern winter (the middle of the calendar year), and 11 hours ahead
in the southern summer. Changes to DST on the last Sunday in October,
and back on the last Sunday in March, in each case at 02:00 standard time
(16:00 UT of the preceding day).
=item EET-2EEST,M3.5.4/24,M9.3.6/145
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTime/TimeZone.pm view on Meta::CPAN
There are also several special values that can be given as names.
If the "name" parameter is "floating", then a C<DateTime::TimeZone::Floating>
object is returned. A floating time zone does not have I<any> offset, and is
always the same time. This is useful for calendaring applications, which may
need to specify that a given event happens at the same I<local> time,
regardless of where it occurs. See L<RFC
2445|https://www.ietf.org/rfc/rfc2445.txt> for more details.
If the "name" parameter is "UTC", then a C<DateTime::TimeZone::UTC> object is
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTime/Util/Astro/Common.pm view on Meta::CPAN
my %EC;
sub ephemeris_correction
{
my $dt = shift;
# we need a gregorian calendar, so make sure $dt is just 'DateTime'
if (ref($dt) ne 'DateTime') {
$dt = DateTime->from_object(object => $dt);
}
my $year = $dt->year;
lib/DateTime/Util/Astro/Common.pm view on Meta::CPAN
=head1 DESCRIPTION
DateTime::Util::Astro::Location implements some functions that are commonly
used for astronomical calculations. As with other DateTime::Util::Astro::
modules this module only implements the bare minimum required to make
astronomical calendars.
=head1 FUNCTIONS
=head2 aberration($dt)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTime/Util/Calc.pm view on Meta::CPAN
my $rv = polynomial($x, @coeffs);
=head1 DEPRECATION WARNING
You really should not be using this module. Math::BigInt nad friends are fine,
but they are not realistic for anything more complicated... like calendars.
If you need an astronomical calendar, use C (and/or provide a very thing
Perl wrapper over it)
Because the author has reached the above conclusion, this module should really
be considered deprecated. It will NOT be maintained regularly.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTimeX/Duration/Lite.pm view on Meta::CPAN
sub is_limit_mode { $_[0]->end_of_month eq 'l' ? 1 : 0 }
sub is_preserve_mode { $_[0]->end_of_month eq 'p' ? 1 : 0 }
sub end_of_month_mode { $_[0]->end_of_month }
sub calendar_duration {
my $self = shift;
return ( ref $self )
->new( map { $_ => $self->$_ } qw( _months _days _end_of_month ) );
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
or croak "Invalid date: $date";
return $date;
};
# Utility function to validate values supplied as a calendar style.
my $_valid_cal_style = sub {
my $style = shift || 'fiscal';
$style =~ tr/A-Z/a-z/;
croak "Invalid calendar style specified: $style"
unless $style =~ /^(fiscal|restated|truncated)$/;
return $style;
};
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
$self->{_weeks_raw} = $weeks;
return;
}
# Build the basic calendar structures as needed.
sub _build_periods {
my $self = shift;
my $style = shift || $self->{style};
# not strictly needed, but makes for easier to read code
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
$pdata->{summary}->{end} = $pdata->{12}->{end};
if ( $self->{_weeks} == 52 ) {
# Set style to 'fiscal' and assign the structure to all
# three calendar types in a normal year to save time and space.
$pdata->{summary}->{style} = 'fiscal';
$self->{_fiscal} = $self->{_restated} = $self->{_truncated} = $pdata;
$self->{_fiscal_weeks} = $wdata;
$self->{_restated_weeks} = $wdata;
$self->{_truncated_weeks} = $wdata;
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
return;
}
# The end day for a specified year is trivial to determine. In normal
# accounting use, a fiscal year is named for the calendar year it ends in,
# not the year it begins.
sub _end5253 {
my $self = shift;
my $dt = DateTime->last_day_of_month(
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
return $dt;
}
# Finding the starting day for a specified year is easy. Simply find
# the last day of the preceding year since the year is defined by
# the ending day and add 1 day to that. This avoids calendar year and month
# boundary issues.
sub _start5253 {
my $self = shift;
# do not assume it is safe to change the year attribute
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
my $self = shift;
return ( $self->{_weeks} == 53 ? 1 : 0 );
}
# return summary data about a calendar.
sub summary {
my $self = shift;
my %args = @_ == 1 ? ( style => shift ) : @_;
$args{style} ||= $self->{style};
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
my $date = &{$_str2dt}( $args{date} )->ymd;
my $whash = $self->{"_${cal}_weeks"};
my $cdata = $self->{"_$cal"}->{summary};
# it is NOT an error if the date isn't in the calendar,
# so return undef to differentiate this from an error condition
return if $date lt $cdata->{start} || $date gt $cdata->{end};
# since the date is in the calendar, let's return it's week,
# and optionally, a structure with period and week number.
my $w;
for ( $w = 1 ; $date gt $whash->{$w}->{end} ; $w++ ) {
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
=pod
=head1 NAME
DateTimeX::Fiscal::Fiscal5253 - Create fiscal 52/53 week calendars
=head1 SYNOPSIS
use DateTimeX::Fiscal::Fiscal5253;
my $fc = DateTimeX::Fiscal::Fiscal5253->new( year => 2012 );
=head1 DESCRIPTION
This module generates calendars for a "52/53 week" fiscal year. They are
also known as "4-4-5" or "4-5-4" calendars due to the repeating week
patterns of the periods in each quarter. A 52/53 week year will B<always>
have either 52 or 53 weeks (364 or 371 days.) One of the best known of
this type is the standard Retail 4-5-4 calendar as defined by the National
Retail Federation.
You are B<strongly> advised to speak with your accounting people
(after all, the reason you are reading this is because they want reports,
right?) and show them the summary data for any given year and see if it
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
=over 4
=item C<end_month>
set the last calendar month of the fiscal year. This should be
an integer in the range 1 .. 12 where "1" is January.
Default: 12
=item C<end_dow>
sets the last day of the week of the fiscal year. This is an
integer in the range 1 .. 7 with Monday being 1. Remember, a 52/53 week
fiscal calendar always ends on the same weekday. Default: 6 (Saturday)
=item C<end_type>
determines how to calculate the last day of the fiscal year
based on the C<end_month> and C<end_dow>. There are two legal vaules:
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
"last" says to use the last weekday in the month of the type specified
in C<end_dow> as the end of the fiscal year.
"closest" says to use the weekday of the type specified that is closest
to the end of the calendar month as the last day, B<even if it is in the
following month>.
=item C<leap_period>
determines what period the 53rd week (if needed) is placed in.
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
"last" says to place the extra week in period 12.
=back
The last two parameters control what year the calendar is generated for.
These parameters are optional but B<mutually exclusive> and will
throw an exception if both are present.
=over 4
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
sets the B<fiscal year> to build for. It defaults to the correct
fiscal year for the current date or to the fiscal year containing the date
specified by C<date>.
The fiscal year value will often be different than the calendar year for
dates that are near the beginning or end of the fiscal year. For example,
Jan 3, 2015 is the last day of FYE2014 when using an C<end_type> of "closest".
B<NOTE!> In normal accounting terms, a fiscal year is named for the calendar
year it ends in. That is, for a fiscal year that ends in October, fiscal year
2005 would begin in October or November of calendar year 2004
(depending upon the setting of C<end_type>.) However, Retail 4-5-4
calendars are named for the year they B<begin> in. This means that a Retail
4-5-4 calendar for 2005 would begin in 2005 and not 2004 as an accountant
would normally think. See the discussion at the end of this documentation
about Retail 4-5-4 calendars for more information.
=item C<date>
if present, is either a string representing a date or a
L<DateTime> object. This will be used to build a calendar that contains
the given value. Again, be aware that dates that are close to the end
of a given fiscal year might have different values for the calendar year
vs the fiscal year.
If the value for C<date> is a string, it must be specified as either
"YYYY-MM-DD" or "MM/DD/YYYY" or some reasonable variant of those such as
single digit days and months. Time components, if present, are discarded.
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
=back
=head1 ACCESSORS
The accessors allow you to examine the parameters used to create the calendar
and the resulting base values. All accessors are read-only and will throw
an exception if a parameter is passed to them.
If you want to change any of the underlying properties that define an
object, B<create a new object!>
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
my $weeks = $fc->weeks();
Returns the number of weeks in the fiscal year as generated by the
parameters given to the construtor. The value will be either "52" or "53"
depending on whether a leap week was added. This value does B<not> look
at the calendar style but rather is based on only the fiscal year itself.
=head2 has_leap_week
my $fc = DateTimeX::Fiscal::Fiscal5253->new( year => 2006 );
print "This is a Fiscal Leap Year" if $fc->has_leap_week;
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
my $fc = DateTimeX::Fiscal::Fiscal5253->new( year => 2006 );
my $cal_style = $fc->style; # returns the current style
$fc->style( 'restated ); # set the style to 'restated'
This method reads and sets the calendar style to be used by all of the
following methods. It can be overridden on a case by case basis as needed
by those methods.
The legal values are "fiscal", "restated", and "truncated" when the style
is being set. A new object has the style set to 'fiscal' by default.
The value 'fiscal' will use a calendar with the full number of weeks
without regard to whether there are 52 or 53 weeks in the year.
The value 'restated' says to ignore the first week in a 53 week year and
create a calendar with only 52 weeks. This allows for more accurate
year-over-year comparisons involving a year that would otherwise have
53 weeks.
The value 'truncated' says to ignore the last week in a 53 week year and
create a calendar with only 52 weeks. This may allow for more accurate
year-over-year comparisons involving a year that would otherwise have
53 weeks.
"restated" and "truncated" have no effect in normal 52 week years.
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
my %summary = $fc->summary( style => 'restated');
my $summary = $fc->summary( 'restated' );
This method will return either a hash or a reference to a hash (depending
upon context) containing a summary of the current calendar style or the one
specified by the style parameter.
my $fc = DateTimeX::Fiscal::Fiscal5253->new( year => 2012 );
my $fc_info = $fc->summary();
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
'weeks' => 52
};
The value contained in C<$fc_info-E<gt>{year}> is the name of the fiscal
year as commonly used by accountants (as in "fye2012") and is usually the
same as the calendar year the fiscal year B<ends> in. However, it is
possible for the actual ending date to be in the B<following> calendar
year when the C<end_month> is '12' (the default) and an C<end_type> of
"closest" is specified, fiscal year 2014 built as shown below demonstrates
this:
my $fc = DateTimeX::Fiscal::Fiscal5253->new(
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
if ( my $wnum = $fc->contains() ) {
print "The current date is in week $wnum\n";
}
if ( $fc->contains( date => 'today', style => 'restated' ) ) {
print 'The current day is in the fiscal calendar';
}
if ( $fc->contains( date => '2012-01-01', style => 'fiscal' ) ) {
print '2012-01-01 is in the fiscal calendar';
}
my $dt = DateTime->today( time_zone => 'floating' );
if ( my $wnum = $fc->contains( date => $dt ) ) {
print "$dt is in week $wnum\n";
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
Returns the week number in the designated style that contains the given
date or C<undef> if not. The method will C<croak> if an error occurs such
as an invalid date format or unknown style type.
This method takes two named parameters, 'date' and 'style'. Bear in mind
that some dates that are in the fiscal calendar might not be in a restated
or truncated calendar. A single un-named parameter can be used as a shorthand
for supplying only the date.
A hash containing both the period and week numbers is returned if the
method is called in list context and the date is present.
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
Accepts the same formats as the constructor as well as the special
keyword 'today'. Defaults to the current date if not supplied.
=item C<style>
Specifies which calendar style to check against and accepts
the same values as the 'style' method does. The default is the current value
returned as set by the C<style> method.
=back
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
Must be a number in the range 1 - 12. An exception will be thrown if this
parameter is not given.
=item C<style>
Specifies what calendar style to retrieve the period information from. Legal
values are the same as those for the C<style> method. The current value of
the C<style> method will be used by default.
=back
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
Must be a number in the range 1 - 52 (53 if a leap week is present in the
requested style.) An exception will be thrown if not given.
=item C<style>
Specifies what calendar style to retrieve the week information from. Legal
values are the same as those for the C<style> method. The current value for
the C<style> method will be used by default.
=back
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
you already know that. Use C<contains> to get the week number for the current
date if applicable. (Besides, C<$fc-E<gt>week_week> is just plain ugly!)
=head1 RETAIL 4-5-4 CALENDARS
A Retail 4-5-4 calendar (as described by the National Retail Federation here:
L<http://www.nrf.com/modules.php?name=Pages&sp_id=392>) is an example of a
fiscal 52/53 week year that starts on the Sunday closest to Jan 31 of
the specified year.
In other words, to create a Retail 4-5-4 calendar for 2012, you will create
a Fiscal5253 object that ends in 2013 on the Saturday closest to Jan 31.
B<Note!> Fiscal years are named for the year they end in, Retail 4-5-4
years are named for the year they B<begin> in!
# Create a Retail 4-5-4 calendar for 2012
my $r2012 = DateTimeX::Fiscal::Fiscal5253->new(
year => 2013, # This will be the ending year for the calendar
end_month => 1, # End in January
end_dow => 6, # on the Saturday
end_type => 'closest', # closest to the end of the month
leap_period => 'last' # and any leap week in the last period
);
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
'weeks' => 52,
'start' => '2012-01-29'
'end' => '2013-01-26',
};
You can verify that this is correct by viewing the calendars available at
the NRF website: L<http://www.nrf.com/4-5-4Calendar>
The reporting date can be determined by adding 5 days to the end of any
given period. Using L<DateTime> makes this trivial:
lib/DateTimeX/Fiscal/Fiscal5253.pm view on Meta::CPAN
Do a Google (or comparable) search to learn more about fiscal Years and
the 52/53 week. This is a fairly arcane subject that usually is of interest
only to accountants and those of us who must provide reports to them.
Of particular interest will be how a Retail 4-5-4 calendar differs in
definition from an accounting 4-4-5 fiscal year.
=head1 CREDITS
This module, like any other in the L<DateTime> family, could not exist
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTimeX/Format/Excel.pm view on Meta::CPAN
Excel has a few date quirks. First, it allows two different epochs. One
for the Windows world and one for the Apple world. The windows epoch
starts in 0-January-1900 and allows for 29-February-1900 (both non real
dates). Most of the explanations for the difference between windows
implementations and Apple implementations focus on the fact that there
was no leap year in 1900 L<(the Gregorian vs Julian calendars)
|http://en.wikipedia.org/wiki/Gregorian_calendar> and the Apple
version wanted to skip that issue. Both non real dates appear to have
been a known issue in the original design of VisiCalc that was carried
through Lotus 1-2-3 and into Excel for L<compatibility
|http://support.microsoft.com/kb/214326>. (Spreadsheets were arguably the
first personal computer killer app and Excel was a L<johnny come lately
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTimeX/Lite.pm view on Meta::CPAN
my ($class, %p) = @_;
my $object = delete $p{object};
my ( $rd_days, $rd_secs, $rd_nanosecs ) = $object->utc_rd_values;
# A kludge because until all calendars are updated to return all
# three values, $rd_nanosecs could be undef
$rd_nanosecs ||= 0;
# This is a big hack to let _seconds_as_components operate naively
# on the given value. If the object _is_ on a leap second, we'll
lib/DateTimeX/Lite.pm view on Meta::CPAN
=over 4
=item (1) Target those who do not need the full feature of DateTime.pm.
In particular, I'm thinking of people who wants to simply grab a date, maybe do some date arithmetic on it, and print the year/month/date or store those values somewhere. These people do not use advanced date logic, sets, or calendars.
=item (2) Target the newbies who are afraid of XS code.
Let's face it, /we/ the developers know how to deal with XS. But we can't expect that out of everybody. DateTime.pm doesn't require XS, but to get decent performance it's sort of a requirement. We do our best to get there without XS.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTimeX/Moment/Duration.pm view on Meta::CPAN
sub is_wrap_mode { 0 }
sub is_limit_mode { 1 }
sub is_preserve_mode { 0 }
sub end_of_month_mode { 'limit' }
sub calendar_duration {
my $self = shift;
my $clone = $self->clone;
$clone->{$_} = 0 for qw/minutes seconds nanoseconds/;
return $clone;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/90-bug-1.t view on Meta::CPAN
use Test::More;
use Test::Exception;
use DateTimeX::Period qw();
# At the end of Thursday, 29 December 2011, Samoa continued directly to
# Saturday, 31 December 2011, skipping the entire calendar day of Friday
# 30 December 2011 ( source: http://en.wikipedia.org/wiki/Time_in_Samoa )
my $dt = DateTimeX::Period->from_epoch(
epoch => 1325152800, # 2011-12-29T00:00:00
time_zone => 'Pacific/Apia'
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTimeX/Seinfeld.pm view on Meta::CPAN
DateTimeX::Seinfeld calculates the maximum Seinfeld chain length from
a sorted list of L<DateTime> objects.
The term "Seinfeld chain" comes from advice attributed to comedian
Jerry Seinfeld. He got a large year-on-one-page calendar and marked a
big red X on every day he wrote something. The chain of continuous
X's gave him a sense of accomplishment and helped motivate him to
write every day.
(Source: L<http://lifehacker.com/281626/jerry-seinfelds-productivity-secret>)
view all matches for this distribution
view release on metacpan or search on metacpan
# module for converting islamic (hijri) and gregorian dates
# (c) zeitform Internet Dienste 2003 - alex@zeitform.de
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#
# based on kcalendarsystemhijri.cpp
# Copyright (c) 2002-2003 Carlos Moro <cfmoro@correo.uniovi.es>
# Copyright (c) 2002-2003 Hans Petter Bieker <bieker@kde.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# You should have received a copy of the GNU Library General Public License
# along with this library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# kcalendarsystemhijri.cpp
# [...] is translated from the Lisp code
# in ``Calendrical Calculations'' by Nachum Dershowitz and
# Edward M. Reingold, Software---Practice & Experience,
# vol. 20, no. 9 (September, 1990), pp. 899--928.
#
return Absolute2Gregorian(Islamic2Absolute($day, $month, $year));
}
sub lastDayOfGregorianMonth
{
# Compute the last date of the month for the Gregorian calendar.
my ($month, $year) = @_;
if ($month == 2)
{
return 29 if ($year % 4 == 0 && $year % 100 != 0) || ($year % 400 == 0);
}
return ((((11 * $year) + 14) % 30) < 11) ? 1 : 0;
}
sub lastDayOfIslamicMonth
{
# Last day in month during year on the Islamic calendar.
my ($month, $year) = @_;
return ($month % 2 == 1) || ($month == 12 && IslamicLeapYear($year)) ? 30 : 29;
}
sub Islamic2Absolute
return int($day # days so far this month
+ 29 * ($month - 1) # days so far...
+ int($month /2) # ...this year
+ 354 * ($year - 1) # non-leap days in prior years
+ (3 + (11 * $year)) / 30 # leap days in prior years
+ IslamicEpoch); # days before start of calendar
}
sub Absolute2Islamic
{
# Computes the Islamic date from the absolute date.
print join("-", g2h(22,8,2003)); # prints 23-6-1424
print join("-", h2g(23,6,1424)); # prints 22-8-2003
=head1 SEE ALSO
This code is just stolen from KDE's L<kcalendarsystemhijri.cpp> at
http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdelibs/kdecore/kcalendarsystemhijri.cpp
Copyright (c) 2002-2003 Carlos Moro <cfmoro@correo.uniovi.es>
Copyright (c) 2002-2003 Hans Petter Bieker <bieker@kde.org>
kcalendarsystemhijri.cpp is translated from the Lisp code
in ``Calendrical Calculations'' by Nachum Dershowitz and
Edward M. Reingold, Software---Practice & Experience,
vol. 20, no. 9 (September, 1990), pp. 899--928.
This code is in the public domain, but any use of it
=head1 DISCLAIMER
I haven't really tested if the converted dates are right and hope
someone will point out mistakes.
Hijri calculations are very difficult. The islamic calendar is a pure
lunar calendar, the new month starts by a physical (i.e. human)
sighting of the crescent moon at a given locale. So it depends on
several factors (like weather) that make it unreliable to calculate
islamic calendars in advance. As a result the dates calculated by
Date::Hijri can be false by one or more days.
Please see http://www.rabiah.com/convert/introduction.html for further
explanation.
I'm not a muslim, but interested in Islamic culture, religion and
calendar system. I believe in the Internet as a chance to realize that
we live in a small world with multiple cultures, religions and
philosophies. We can learn from others and develop tolerance, respect
and understanding.
Salam Alaikum (peace be with you)
view all matches for this distribution
view release on metacpan or search on metacpan
pod/command_help.pod view on Meta::CPAN
It is 52 minutes past 8 o'clock am, on the Day of the Bull,
the 2nd Day of the Month of the Frost Giant, Year 63.
Time of Year: The Season of New Year.
An hour of game time passes in 3 minutes of real time. The time and
calendar uses 60 minutes per hour, 28 hours per day, seven days per week,
five weeks per month, and 17 months per year. The year is additionally
split into four seasons of 4 months each, except the season of the
Blizzard, which is 5 months long.
The number "zero" is unknown, which is why the minutes go from 1 to 60.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/SizeMe/Graph/static/bootstrap/css/bootstrap.css view on Meta::CPAN
.icon-plane {
background-position: -168px -120px;
}
.icon-calendar {
background-position: -192px -120px;
}
.icon-random {
width: 16px;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/hdb/html/bootstrap.css view on Meta::CPAN
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
*/.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;wi...
view all matches for this distribution
view release on metacpan or search on metacpan
t/contents/test_debian_dists_sid_main_Contents view on Meta::CPAN
usr/include/xulrunner-1.9/unstable/nsURILoader.h libdevel/xulrunner-dev
usr/lib/R/site-library/XML/R-ex/parseURI.R math/r-cran-xml
usr/lib/R/site-library/XML/help/parseURI math/r-cran-xml
usr/lib/R/site-library/XML/html/parseURI.html math/r-cran-xml
usr/lib/R/site-library/XML/latex/parseURI.tex math/r-cran-xml
usr/lib/R/site-library/fCalendar/R-ex/holidayZURICH.R math/r-cran-fcalendar
usr/lib/R/site-library/fCalendar/help/holidayZURICH math/r-cran-fcalendar
usr/lib/R/site-library/fCalendar/html/holidayZURICH.html math/r-cran-fcalendar
usr/lib/R/site-library/fCalendar/latex/holidayZURICH.tex math/r-cran-fcalendar
usr/lib/R/site-library/timeDate/R-ex/holidayZURICH.R math/r-cran-timedate
usr/lib/R/site-library/timeDate/help/holidayZURICH math/r-cran-timedate
usr/lib/R/site-library/timeDate/html/holidayZURICH.html math/r-cran-timedate
usr/lib/R/site-library/timeDate/latex/holidayZURICH.tex math/r-cran-timedate
usr/lib/gcc-snapshot/include/c++/4.4.0/java/net/URI.h devel/gcc-snapshot
view all matches for this distribution
view release on metacpan or search on metacpan
Notes/cpan-namespaces/cpan-namespaces-L1-L2.txt view on Meta::CPAN
Date::Ordinal
Date::Parse
Date::Parser
Date::Passover
Date::Pcalc
Date::Pcalendar
Date::Period
Date::PeriodParser
Date::Persian
Date::Piece
Date::Pregnancy
view all matches for this distribution
view release on metacpan or search on metacpan
examples/site/src/products/products.html view on Meta::CPAN
Content Management System or a Forum! </p>
<ul>
<li><a href="http://www.linuxquebec.com/~nomis80/chronos">Chronos</a>
is a Web agenda/calendar for Intranets (but it can be used from
anywhere). It can send reminders by email. It can schedule multi-user
events. It is fast and light on resources. It is not proprietary, ugly
nor buggy.</li>
<li><a href="http://dnszone.org/">DnsZone</a> is a fully functional
examples/site/src/products/products.html view on Meta::CPAN
notes, and it can rely on persistent database connections through
DBI. These features allow DAD to efficiently implement advanced
targeting rules that would be impossible under CGI. </li>
<li> <a
href="http://www.cyberweavers.com/download/cybercalendar.html">CyberCalendar</a>
is a calendar of events program for the web and PDAs written entirely
in Perl. </li>
<li> <a href="http://www.ma.utexas.edu/webcalendar/">WebCalendar</a>
is a powerful group calendaring and scheduling system. It is a web
based application that makes it easy to publish and manage calendar
events on the internet. WebCalendar includes an impressive set of
business class features. Its easy to use interface, rich
functionality, and sophisticated scheduling system makes it one of the
best calendar applications on the internet. </li>
<li> <a href="http://www.ringlink.org/">Ringlink</a> is a Perl program
that provides the tools you need to run one or more rings of web
sites, i.e. systems of links between web sites of a similar topic,
content, or interest. </li>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Don/Mendo.pm view on Meta::CPAN
Llevo en esta prisión un mes y un dÃa,
sin por nadie saber lo que acontece... (Estremeciéndose.)
¡Y hoy martes, gran Dios!... ¡Martes y trece!...
¿Por qué el terror invade el alma mÃa?
¿Por qué me inspira un miedo extraordinario
esa cifra, ¡ay de mÃ!, del calendario? (Como loco.)
¡Ah, no, cifra fatal!... No humillaréis
el valor de don Mendo; no podréis;
todos iguales para mà seréis,,,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Drought/PET/Thornthwaite.pm view on Meta::CPAN
my $tei = tei_thornthwaite($jan,$feb,$mar,$apr,$may,$jun,$jul,$aug,$sep,$oct,$nov,$dec);
Calculates and returns the temperature efficiency index (TEI, sometimes called the
Thornthwaite heat index) based on a monthly average temperature climatology for a given
location. Since the equation involves a summation of adjusted monthly temperatures, 12
arguments are required, consisting of the average temperature for each calendar month of
the year. An optional 13th argument can also be supplied to define a numeric value
interpreted as missing data. If not supplied, the default missing value is NaN.
The missing value will be returned if any of the temperature values are missing,
undef, or invalid (e.g., non-numeric).
view all matches for this distribution
view release on metacpan or search on metacpan
share/public/css/ui-lightness/jquery-ui-1.8.16.custom.css view on Meta::CPAN
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
share/public/css/ui-lightness/jquery-ui-1.8.16.custom.css view on Meta::CPAN
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
/* with multiple calendars */
.ui-datepicker.ui-datepicker-multi { width:auto; }
.ui-datepicker-multi .ui-datepicker-group { float:left; }
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
view all matches for this distribution