view release on metacpan or search on metacpan
lib/Calendar/Dates/Academic/ID/UT/PPs.pm view on Meta::CPAN
with 'Calendar::DatesRoles::DataPreparer::CalendarVar::FromDATA::Simple';
with 'Calendar::DatesRoles::DataUser::CalendarVar';
1;
# ABSTRACT: Academic calendar of Universitas Terbuka (postgraduate programs, program pascasarjana)
=pod
=encoding UTF-8
=head1 NAME
Calendar::Dates::Academic::ID::UT::PPs - Academic calendar of Universitas Terbuka (postgraduate programs, program pascasarjana)
=head1 VERSION
This document describes version 0.003 of Calendar::Dates::Academic::ID::UT::PPs (from Perl distribution Calendar-Dates-Academic-ID-UT-PPs), released on 2019-06-20.
lib/Calendar/Dates/Academic/ID/UT/PPs.pm view on Meta::CPAN
tags => ["smt2019/20.1"],
year => 2019,
},
]
=head2 Using from CLI (requires L<list-calendar-dates> and L<calx>)
% list-calendar-dates -l -m Academic::ID::UT::PPs
% calx -c Academic::ID::UT::PPs
=head1 DESCRIPTION
This module provides academic calendar of Indonesia's open university
Universitas Terbuka (postgraduate programs, program pascasarjana).
=head1 DATES STATISTICS
+---------------+-------+
lib/Calendar/Dates/Academic/ID/UT/PPs.pm view on Meta::CPAN
L<Calendar::Dates>
L<App::CalendarDatesUtils> contains CLIs to list dates from this module, etc.
L<calx> from L<App::calx> can display calendar and highlight dates from Calendar::Dates::* modules
=head1 AUTHOR
perlancar <perlancar@cpan.org>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Dates/CFA.pm view on Meta::CPAN
}
1;
}
1;
# ABSTRACT: CFA exam calendar
=pod
=encoding UTF-8
=head1 NAME
Calendar::Dates::CFA - CFA exam calendar
=head1 VERSION
This document describes version 20200505.0.0 of Calendar::Dates::CFA (from Perl distribution Calendar-Dates-CFA), released on 2020-05-05.
lib/Calendar/Dates/CFA.pm view on Meta::CPAN
tags => ["dec2020exam", "l1", "l2", "l3"],
year => 2020,
},
]
=head2 Using from CLI (requires L<list-calendar-dates> and L<calx>)
% list-calendar-dates -l -m CFA
% calx -c CFA
=head1 DESCRIPTION
This module provides CFA exam calendar using the L<Calendar::Dates> interface.
=head1 DATES STATISTICS
+---------------+-------+
| key | value |
lib/Calendar/Dates/CFA.pm view on Meta::CPAN
L<Calendar::Dates>
L<App::CalendarDatesUtils> contains CLIs to list dates from this module, etc.
L<calx> from L<App::calx> can display calendar and highlight dates from Calendar::Dates::* modules
=head1 AUTHOR
perlancar <perlancar@cpan.org>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Dates/FRM.pm view on Meta::CPAN
# levels/parts.
1;
}
1;
# ABSTRACT: FRM exam calendar
=pod
=encoding UTF-8
=head1 NAME
Calendar::Dates::FRM - FRM exam calendar
=head1 VERSION
This document describes version 0.008 of Calendar::Dates::FRM (from Perl distribution Calendar-Dates-FRM), released on 2020-01-03.
lib/Calendar/Dates/FRM.pm view on Meta::CPAN
tags => ["nov2020exam"],
year => 2020,
},
]
=head2 Using from CLI (requires L<list-calendar-dates> and L<calx>)
% list-calendar-dates -l -m FRM
% calx -c FRM
=head1 DESCRIPTION
This module provides FRM exam calendar using the L<Calendar::Dates> interface.
=head1 DATES STATISTICS
+---------------+-------+
| key | value |
lib/Calendar/Dates/FRM.pm view on Meta::CPAN
L<Calendar::Dates>
L<App::CalendarDatesUtils> contains CLIs to list dates from this module, etc.
L<calx> from L<App::calx> can display calendar and highlight dates from Calendar::Dates::* modules
=head1 AUTHOR
perlancar <perlancar@cpan.org>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
push @{ $CALENDAR->{entries} }, $e;
}
}
1;
# ABSTRACT: Indonesian holiday calendar
__END__
=pod
=encoding UTF-8
=head1 NAME
Calendar::Dates::ID::Holiday - Indonesian holiday calendar
=head1 VERSION
This document describes version 0.008 of Calendar::Dates::ID::Holiday (from Perl distribution Calendar-Dates-ID-Holiday), released on 2021-03-09.
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" => 1,
"is_joint_leave" => 0,
"month" => 2,
"summary" => "Chinese New Year 2572",
"summary.alt.lang.id" => "Tahun Baru Imlek 2572",
"tags" => ["international", "calendar=lunar"],
"year" => 2021,
"year_start" => 2003,
},
{
"date" => "2021-03-11",
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" => 1,
"is_joint_leave" => 0,
"month" => 3,
"summary" => "Isra And Miraj",
"summary.alt.lang.id" => "Isra Miraj",
"tags" => ["religious", "religion=islam", "calendar=lunar"],
"year" => 2021,
},
{
"date" => "2021-03-14",
"day" => 14,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" => 1,
"is_joint_leave" => 0,
"month" => 3,
"summary" => "Nyepi 1943",
"summary.alt.lang.id" => "Nyepi 1943",
"tags" => ["religious", "religion=hinduism", "calendar=saka"],
"year" => 2021,
},
{
"date" => "2021-04-02",
"day" => 2,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
ind_aliases => ["Lebaran"],
ind_name => "Idul Fitri 1442H (Hari 1)",
is_holiday => 1,
is_joint_leave => 0,
month => 5,
tags => ["religious", "religion=islam", "calendar=lunar"],
year => 2021,
},
],
"is_holiday" => 1,
"is_joint_leave" => 0,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"summary.alt.lang.id" => "Kenaikan Isa Al-Masih, Idul Fitri 1442H (Hari 1)",
"tags" => [
"religious",
"religion=christianity",
"religion=islam",
"calendar=lunar",
],
"year" => 2021,
},
{
"date" => "2021-05-14",
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" => 1,
"is_joint_leave" => 0,
"month" => 5,
"summary" => "Eid Ul-Fitr 1442H (Day 1)",
"summary.alt.lang.id" => "Idul Fitri 1442H (Hari 1)",
"tags" => ["religious", "religion=islam", "calendar=lunar"],
"year" => 2021,
},
{
"date" => "2021-05-26",
"day" => 26,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" => 1,
"is_joint_leave" => 0,
"month" => 7,
"summary" => "Eid Al-Adha",
"summary.alt.lang.id" => "Idul Adha",
"tags" => ["religious", "religion=islam", "calendar=lunar"],
"year" => 2021,
},
{
"date" => "2021-08-10",
"day" => 10,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" => 1,
"is_joint_leave" => 0,
"month" => 8,
"summary" => "Hijra 1443H",
"summary.alt.lang.id" => "Tahun Baru Hijriyah 1443H",
"tags" => ["calendar=lunar"],
"year" => 2021,
},
{
"date" => "2021-08-17",
"day" => 17,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" => 1,
"is_joint_leave" => 0,
"month" => 10,
"summary" => "Mawlid",
"summary.alt.lang.id" => "Maulid Nabi Muhammad",
"tags" => ["religious", "religion=islam", "calendar=lunar"],
"year" => 2021,
},
{
"date" => "2021-12-24",
"day" => 24,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
],
"year" => 2021,
},
]
=head2 Using from CLI (requires L<list-calendar-dates> and L<calx>)
% list-calendar-dates -l -m ID::Holiday
% calx -c ID::Holiday
=head1 DESCRIPTION
This module provides Indonesian holiday calendar using the L<Calendar::Dates>
interface.
=head1 DATES STATISTICS
+---------------+-------+
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" : 1,
"is_joint_leave" : 0,
"month" : 1,
"summary" : "Chinese New Year 2571",
"summary.alt.lang.id" : "Tahun Baru Imlek 2571",
"tags" : "international, calendar=lunar",
"year" : 2020,
"year_start" : 2003
},
{
"date" : "2020-03-22",
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" : 1,
"is_joint_leave" : 0,
"month" : 3,
"summary" : "Isra And Miraj",
"summary.alt.lang.id" : "Isra Miraj",
"tags" : "religious, religion=islam, calendar=lunar",
"year" : 2020
},
{
"date" : "2020-03-25",
"day" : 25,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" : 1,
"is_joint_leave" : 0,
"month" : 3,
"summary" : "Nyepi 1942",
"summary.alt.lang.id" : "Nyepi 1942",
"tags" : "religious, religion=hinduism, calendar=saka",
"year" : 2020
},
{
"date" : "2020-04-10",
"day" : 10,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" : 1,
"is_joint_leave" : 0,
"month" : 5,
"summary" : "Eid Ul-Fitr 1441H (Day 1)",
"summary.alt.lang.id" : "Idul Fitri 1441H (Hari 1)",
"tags" : "religious, religion=islam, calendar=lunar",
"year" : 2020
},
{
"date" : "2020-05-25",
"day" : 25,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" : 1,
"is_joint_leave" : 0,
"month" : 5,
"summary" : "Eid Ul-Fitr 1441H (Day 2)",
"summary.alt.lang.id" : "Idul Fitri 1441H (Hari 2)",
"tags" : "religious, religion=islam, calendar=lunar",
"year" : 2020
},
{
"date" : "2020-06-01",
"day" : 1,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" : 1,
"is_joint_leave" : 0,
"month" : 7,
"summary" : "Eid Al-Adha",
"summary.alt.lang.id" : "Idul Adha",
"tags" : "religious, religion=islam, calendar=lunar",
"year" : 2020
},
{
"date" : "2020-08-17",
"day" : 17,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" : 1,
"is_joint_leave" : 0,
"month" : 8,
"summary" : "Hijra 1442H",
"summary.alt.lang.id" : "Tahun Baru Hijriyah 1442H",
"tags" : "calendar=lunar",
"year" : 2020
},
{
"date" : "2020-08-21",
"day" : 21,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" : 1,
"is_joint_leave" : 0,
"month" : 10,
"summary" : "Mawlid",
"summary.alt.lang.id" : "Maulid Nabi Muhammad",
"tags" : "religious, religion=islam, calendar=lunar",
"year" : 2020
},
{
"date" : "2020-10-30",
"day" : 30,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" : 1,
"is_joint_leave" : 0,
"month" : 2,
"summary" : "Chinese New Year 2572",
"summary.alt.lang.id" : "Tahun Baru Imlek 2572",
"tags" : "international, calendar=lunar",
"year" : 2021,
"year_start" : 2003
},
{
"date" : "2021-03-11",
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" : 1,
"is_joint_leave" : 0,
"month" : 3,
"summary" : "Isra And Miraj",
"summary.alt.lang.id" : "Isra Miraj",
"tags" : "religious, religion=islam, calendar=lunar",
"year" : 2021
},
{
"date" : "2021-03-14",
"day" : 14,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" : 1,
"is_joint_leave" : 0,
"month" : 3,
"summary" : "Nyepi 1943",
"summary.alt.lang.id" : "Nyepi 1943",
"tags" : "religious, religion=hinduism, calendar=saka",
"year" : 2021
},
{
"date" : "2021-04-02",
"day" : 2,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_joint_leave" : 0,
"month" : 5,
"tags" : [
"religious",
"religion=islam",
"calendar=lunar"
],
"year" : 2021
}
],
"is_holiday" : 1,
"is_joint_leave" : 0,
"month" : 5,
"multiple" : 1,
"summary" : "Ascension Day, Eid Ul-Fitr 1442H (Day 1)",
"summary.alt.lang.id" : "Kenaikan Isa Al-Masih, Idul Fitri 1442H (Hari 1)",
"tags" : "religious, religion=christianity, religion=islam, calendar=lunar",
"year" : 2021
},
{
"date" : "2021-05-14",
"day" : 14,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" : 1,
"is_joint_leave" : 0,
"month" : 5,
"summary" : "Eid Ul-Fitr 1442H (Day 1)",
"summary.alt.lang.id" : "Idul Fitri 1442H (Hari 1)",
"tags" : "religious, religion=islam, calendar=lunar",
"year" : 2021
},
{
"date" : "2021-05-26",
"day" : 26,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" : 1,
"is_joint_leave" : 0,
"month" : 7,
"summary" : "Eid Al-Adha",
"summary.alt.lang.id" : "Idul Adha",
"tags" : "religious, religion=islam, calendar=lunar",
"year" : 2021
},
{
"date" : "2021-08-10",
"day" : 10,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" : 1,
"is_joint_leave" : 0,
"month" : 8,
"summary" : "Hijra 1443H",
"summary.alt.lang.id" : "Tahun Baru Hijriyah 1443H",
"tags" : "calendar=lunar",
"year" : 2021
},
{
"date" : "2021-08-17",
"day" : 17,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
"is_holiday" : 1,
"is_joint_leave" : 0,
"month" : 10,
"summary" : "Mawlid",
"summary.alt.lang.id" : "Maulid Nabi Muhammad",
"tags" : "religious, religion=islam, calendar=lunar",
"year" : 2021
},
{
"date" : "2021-12-24",
"day" : 24,
lib/Calendar/Dates/ID/Holiday.pm view on Meta::CPAN
L<Calendar::Dates>
L<App::CalendarDatesUtils> contains CLIs to list dates from this module, etc.
L<calx> from L<App::calx> can display calendar and highlight dates from Calendar::Dates::* modules
=head1 AUTHOR
perlancar <perlancar@cpan.org>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Dates/Perl.pm view on Meta::CPAN
tags => ["anniversary"],
year => 2019,
},
]
=head2 Using from CLI (requires L<list-calendar-dates> and L<calx>)
% list-calendar-dates -l -m Perl
% calx -c Perl
=head1 DESCRIPTION
=head1 DATES STATISTICS
lib/Calendar/Dates/Perl.pm view on Meta::CPAN
L<Calendar::Dates>
L<App::CalendarDatesUtils> contains CLIs to list dates from this module, etc.
L<calx> from L<App::calx> can display calendar and highlight dates from Calendar::Dates::* modules
=head1 AUTHOR
perlancar <perlancar@cpan.org>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Dates/UnitedNations/InternationalDays.pm view on Meta::CPAN
tags => ["anniversary"],
year => 2020,
},
]
=head2 Using from CLI (requires L<list-calendar-dates> and L<calx>)
% list-calendar-dates -l -m UnitedNations::InternationalDays
% calx -c UnitedNations::InternationalDays
=head1 DESCRIPTION
Currently only days with fixed date in Gregorian calendar are included. These
are not:
11 May (second Saturday of May) World Migratory Bird Day
6 July (first Saturday in July) International Day of Cooperatives
26 September (last Thursday of September World Maritime Day
lib/Calendar/Dates/UnitedNations/InternationalDays.pm view on Meta::CPAN
L<Calendar::Dates>
L<App::CalendarDatesUtils> contains CLIs to list dates from this module, etc.
L<calx> from L<App::calx> can display calendar and highlight dates from Calendar::Dates::* modules
=head1 AUTHOR
perlancar <perlancar@cpan.org>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Dates.pm view on Meta::CPAN
our $DATE = '2019-06-22'; # DATE
our $VERSION = '0.2.3'; # VERSION
1;
# ABSTRACT: Modules that contain calendar dates
__END__
=pod
=encoding UTF-8
=head1 NAME
Calendar::Dates - Modules that contain calendar dates
=head1 SPECIFICATION VERSION
0.1
lib/Calendar/Dates.pm view on Meta::CPAN
This document describes version 0.2.3 of Calendar::Dates (from Perl distribution Calendar-Dates), released on 2019-06-22.
=head1 DESCRIPTION
The C<Calendar::Dates::*> namespace is reserved for modules that provide
calendar dates using a common interface. The interface is designed to be: simple
to implement, lightweight, and easy to use and export (e.g. to an iCal
calendar).
Conventions for subdivision under the C<Calendar::Dates::> namespace:
=over
=item * Country-specific calendars go to <XX>::*, where <XX> is the ISO3166-1 2-letter country code
Examples:
Calendar::Dates::SG::Events
Calendar::Dates::SG::FestivalsEvents
Calendar::Dates::ID::Tax
=item * Country-specific (public) holiday calendars go to <XX>::Holiday::*
Examples:
Calendar::Dates::US::Holiday
=item * Region/province- and locality-specific calendars go to <CC>::<Name>::*
Examples:
Calendar::Dates::ID::Jakarta::Events
lib/Calendar/Dates.pm view on Meta::CPAN
Examples:
Calendar::Dates::ID::Holiday::2019
=item * Religion-related calendars go to Religion::<Name>::*
Examples:
Calendar::Dates::Religion::Christianity
=item * Sports-related calendars go to Sports::*
Examples:
Calendar::Dates::Sports::WTA
Calendar::Dates::Sports::WTA::2019
lib/Calendar/Dates.pm view on Meta::CPAN
Return entries for a particular year (or month, or day). Method must die if year
(or month, or day) is not supported.
B<Parameters.> The optional C<%params> can be specified for more complex
querying/filtering. Each calendar module might support different parameters, and
should die if a parameter is unsupported. Currently known common/standardized
parameters:
=over
lib/Calendar/Dates.pm view on Meta::CPAN
=back
B<Optional parameters.> A hashref (parameters) can be specified as an optional
first argument. It can be used to specify in more details what kind of entries
are requested. For example, a Calendar::Dates::AU::Holiday module (Australian
holiday calendar) contains different holidays for different provinces. User can
specify:
# return 2019 holiday dates for Victoria
$entries = Calendar::Dates::AU::Holiday->get_entries({province=>'VIC'}, 2019);
lib/Calendar/Dates.pm view on Meta::CPAN
=over
=item * L<App::CalendarDatesUtils>
which contain utilities like L<list-calendar-dates>, etc.
=item * L<calx> from L<App::calx>
Uses Calendar::Dates::* to highlight dates.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/DatesRoles/DataUser/CalendarVar.pm view on Meta::CPAN
$min = $e->{year} if !defined($min) || $min > $e->{year};
$max = $e->{year} if !defined($max) || $max < $e->{year};
}
} elsif ($e->{date} =~ /\A(?:--)([0-9]{2})-([0-9]{2})\z/) {
# anniversary without starting year
$min_anniv = 1582 if !defined($min_anniv) || $min_anniv > 1582; # start of gregorian calendar :-)
$max_anniv = 9999 if !defined($max_anniv) || $max_anniv < 9999;
$e->{month} //= $1 + 0;
$e->{day} //= $2 + 0;
} elsif ($e->{date} =~ m!\AR/([0-9]{4})-([0-9]{2})-([0-9]{2})/P1Y\z!) {
# anniversary with starting year
lib/Calendar/DatesRoles/DataUser/CalendarVar.pm view on Meta::CPAN
=head2 get_min_year
Only years from non-anniversary dates are accounted for when determining
min_year and max_year. But if there are no non-anniversary dates in the
calendar, then the years from anniversaries will also be used.
=head2 get_max_year
Only years from non-anniversary dates are accounted for when determining
min_year and max_year. But if there are no non-anniversary dates in the
calendar, then the years from anniversaries will also be used.
=head2 get_entries
Usage:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Gregorian.pm view on Meta::CPAN
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
| 27 | 28 | 29 | 30 | 31 | |
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
The package L<App::calendr> provides command line tool C<calendr> to display the
supported calendars on the terminal.
=head1 SYNOPSIS
use strict; use warnings;
use Calendar::Gregorian;
# prints current gregorian month calendar.
print Calendar::Gregorian->new, "\n";
print Calendar::Gregorian->new->current, "\n";
# prints gregorian month calendar for the first month of year 2016.
print Calendar::Gregorian->new({ month => 1, year => 2016 }), "\n";
# prints gregorian month calendar in which the given julian date falls in.
print Calendar::Gregorian->new->from_julian(2457102.5), "\n";
# prints current month gregorian calendar in SVG format.
print Calendar::Gregorian->new->as_svg;
# prints current month gregorian calendar in text format.
print Calendar::Gregorian->new->as_text;
=head1 GREGORIAN MONTHS
+--------+------------------------------------------------------------------+
lib/Calendar/Gregorian.pm view on Meta::CPAN
=head1 METHODS
=head2 current()
Returns current month of the Gregorian calendar.
=cut
sub current {
my ($self) = @_;
lib/Calendar/Gregorian.pm view on Meta::CPAN
return $self->as_text($self->date->month, $self->date->year);
}
=head2 from_julian($julian_date)
Returns Gregorian month calendar in which the given julian date falls in.
=cut
sub from_julian {
my ($self, $julian) = @_;
lib/Calendar/Gregorian.pm view on Meta::CPAN
return $self->as_text($date->month, $date->year);
}
=head2 as_svg($month, $year)
Returns calendar for the given C<$month> and C<$year> rendered in SVG format. If
C<$month> and C<$year> missing, it would return current calendar month.
=cut
sub as_svg {
my ($self, $month, $year) = @_;
($month, $year) = $self->validate_params($month, $year);
my $date = Date::Gregorian::Simple->new({ year => $year, month => $month, day => 1 });
return $self->svg_calendar(
{
start_index => $date->day_of_week,
month_name => $date->months->[$month],
days => $date->days_in_month_year($month, $year),
year => $year
});
}
=head2 as_text($month, $year)
Returns color coded Gregorian calendar for the given C<$month> and C<$year>. If
C<$month> and C<$year> missing, it would return current calendar month.
=cut
sub as_text {
my ($self, $month, $year) = @_;
($month, $year) = $self->validate_params($month, $year);
my $date = Date::Gregorian::Simple->new({ year => $year, month => $month, day => 1 });
return $self->text_calendar(
{
start_index => $date->day_of_week,
month_name => $date->get_month_name,
days => $date->days_in_month_year($month, $year),
day_names => $date->days,
lib/Calendar/Gregorian.pm view on Meta::CPAN
=back
=head1 BUGS
Please report any bugs / feature requests to C<bug-calendar-gregorian at rt.cpan.org>
or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Calendar-Gregorian>.
I will be notified, and then you'll automatically be notified of progress on your
bug as I make changes.
=head1 SUPPORT
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Hebrew.pm view on Meta::CPAN
=head1 DESCRIPTION
The C<Calendar::Hebrew> was released on Sunday 23rd July 2017 to mark the completion
of L<1000th consecutive days of releasing to CPAN|http://blogs.perl.org/users/mohammad_s_anwar/2017/07/1000th-consecutive-days-releasing-to-cpan.html>.
The Hebrew or Jewish calendar is a lunisolar calendar used today predominantly
for Jewish religious observances. It determines the dates for Jewish holidays and
the appropriate public reading of Torah portions, yahrzeits (dates to commemorate
the death of a relative), and daily Psalm readings, among many ceremonial uses.
The Hebrew lunar year is about eleven days shorter than the solar year and uses
the 19-year Metonic cycle to bring it into line with the solar year, with the
addition of an intercalary month every two or three years, for a total of seven
times per 19 years. Even with this intercalation, the average Hebrew calendar
year is longer by about 6 minutes and 40 seconds than the current mean tropical
year, so that every 216 years the Hebrew calendar will fall a day behind the
current mean tropical year; and about every 231 years it will fall a day behind
the mean Gregorian calendar year.
+--------------------------------------------------------------------------------------------------------+
| Tammuz [5777 BE] |
+--------------+--------------+--------------+--------------+--------------+--------------+--------------+
| Yom Rishon | Yom Sheni | Yom Shelishi | Yom Revil | Yom Hamishi | Yom Shishi | Shabbat |
lib/Calendar/Hebrew.pm view on Meta::CPAN
+--------------+--------------+--------------+--------------+--------------+--------------+--------------+
| 29 | |
+--------------+--------------+--------------+--------------+--------------+--------------+--------------+
The package L<App::calendr> provides command line tool C<calendr> to display the
supported calendars on the terminal. Support for C<Hebrew Calendar> is provided
by L<App::calendr> v0.16 or above.
=head1 SYNOPSIS
use strict; use warnings;
use Calendar::Hebrew;
# prints current month calendar
print Calendar::Hebrew->new, "\n";
print Calendar::Hebrew->new->current, "\n";
# prints hebrew month calendar in which the given gregorian date falls in.
print Calendar::Hebrew->new->from_gregorian(2015, 1, 14), "\n";
# prints hebrew month calendar in which the given julian day falls in.
print Calendar::Hebrew->new->from_julian(2457102.5), "\n";
# prints current month hebrew calendar in SVG format.
print Calendar::Hebrew->new->as_svg;
# prints current month hebrewn calendar in text format.
print Calendar::Hebrew->new->as_text;
=head1 HEBREW MONTHS
+-------+-------------------------------------------------------------------+
lib/Calendar/Hebrew.pm view on Meta::CPAN
=head1 METHODS
=head2 current()
Returns current month of the Hebrew calendar.
=cut
sub current {
my ($self) = @_;
lib/Calendar/Hebrew.pm view on Meta::CPAN
return $self->as_text($self->date->month, $self->date->year);
}
=head2 from_gregorian($year, $month, $day)
Returns hebrew month calendar in which the given gregorian date falls in.
=cut
sub from_gregorian {
my ($self, $year, $month, $day) = @_;
lib/Calendar/Hebrew.pm view on Meta::CPAN
return $self->from_julian($self->date->gregorian_to_julian($year, $month, $day));
}
=head2 from_julian($julian_day)
Returns hebrew month calendar in which the given julian day falls in.
=cut
sub from_julian {
my ($self, $julian_day) = @_;
lib/Calendar/Hebrew.pm view on Meta::CPAN
return $self->as_text($date->month, $date->year);
}
=head2 as_svg($month, $year)
Returns calendar for the given C<$month> and C<$year> rendered in SVG format. If
C<$month> and C<$year> missing, it would return current calendar month.
=cut
sub as_svg {
my ($self, $month, $year) = @_;
($month, $year) = $self->validate_params($month, $year);
my $date = Date::Hebrew::Simple->new({ year => $year, month => $month, day => 1 });
return $self->svg_calendar({
start_index => $date->day_of_week,
month_name => $date->get_month_name,
days => $date->days_in_month_year($month, $year),
year => $year });
}
=head2 as_text($month, $year)
Returns color coded Hebrew calendar for the given C<$month> and C<$year>. If
C<$month> and C<$year> missing, it would return current calendar month.
=cut
sub as_text {
my ($self, $month, $year) = @_;
($month, $year) = $self->validate_params($month, $year);
my $date = Date::Hebrew::Simple->new({ year => $year, month => $month, day => 1 });
return $self->text_calendar(
{
start_index => $date->day_of_week,
month_name => $date->get_month_name,
days => $date->days_in_month_year($month, $year),
day_names => $date->days,
lib/Calendar/Hebrew.pm view on Meta::CPAN
=back
=head1 BUGS
Please report any bugs or feature requests to C<bug-calendar-hebrew at rt.cpan.org>,
or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Calendar-Hebrew>.
I will be notified, and then you'll automatically be notified of progress on your
bug as I make changes.
=head1 SUPPORT
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Hijri.pm view on Meta::CPAN
in the Quran as the first day of the month of Muharram.In 17 AH Umar I,the second
caliph, established the beginning of the era of the Hegira ( 1 Muharram 1 AH ) as
the date that is 16 July 622 CE in the Julian Calendar.
The years are lunar & consist of 12 lunar months. There is no intercalary period,
since the Quran ( Sura IX, verses 36,37 ) sets the calendar year at 12 months.
Because the year in the Hijri calendar is shorter than a solar year, the months
drift with respect to the seasons, in a cycle 32.50 years.
+--------------------------------------------------------------------------------------------------------+
| Sha'aban [1436 BE] |
+--------------+--------------+--------------+--------------+--------------+--------------+--------------+
lib/Calendar/Hijri.pm view on Meta::CPAN
+--------------+--------------+--------------+--------------+--------------+--------------+--------------+
| 26 | 27 | 28 | 29 | |
+--------------+--------------+--------------+--------------+--------------+--------------+--------------+
The package L<App::calendr> provides command line tool C<calendr> to display the
supported calendars on the terminal.
=head1 SYNOPSIS
use strict; use warnings;
use Calendar::Hijri;
# prints current hijri month calendar.
print Calendar::Hijri->new, "\n";
print Calendar::Hijri->new->current, "\n";
# prints hijri month calendar for the first month of year 1436.
print Calendar::Hijri->new({ month => 1, year => 1436 }), "\n";
# prints hijri month calendar in which the given gregorian date falls in.
print Calendar::Hijri->new->from_gregorian(2015, 1, 14), "\n";
# prints hijri month calendar in which the given julian date falls in.
print Calendar::Hijri->new->from_julian(2457102.5), "\n";
# prints current month hijri calendar in SVG format.
print Calendar::Hijri->new->as_svg;
# prints current month hijri calendar in text format.
print Calendar::Hijri->new->as_text;
=head1 HIJRI MONTHS
+--------+------------------------------------------------------------------+
lib/Calendar/Hijri.pm view on Meta::CPAN
=head1 METHODS
=head2 current()
Returns current month of the Hijri calendar.
=cut
sub current {
my ($self) = @_;
lib/Calendar/Hijri.pm view on Meta::CPAN
return $self->as_text($self->date->month, $self->date->year);
}
=head2 from_gregorian()
Returns Hijri month calendar in which the given gregorian date falls in.
=cut
sub from_gregorian {
my ($self, $year, $month, $day) = @_;
lib/Calendar/Hijri.pm view on Meta::CPAN
return $self->from_julian($self->date->gregorian_to_julian($year, $month, $day));
}
=head2 from_julian($julian_date)
Returns Hijri month calendar in which the given julian date falls in.
=cut
sub from_julian {
my ($self, $julian) = @_;
lib/Calendar/Hijri.pm view on Meta::CPAN
return $self->as_text($date->month, $date->year);
}
=head2 as_text($month, $year)
Returns color coded Hijri calendar for the given C<$month> and C<$year>. If
C<$month> and C<$year> missing, it would return current calendar month.
=cut
sub as_text {
my ($self, $month, $year) = @_;
($month, $year) = $self->validate_params($month, $year);
my $date = Date::Hijri::Simple->new({ year => $year, month => $month, day => 1 });
return $self->text_calendar(
{
start_index => $date->day_of_week,
month_name => $date->get_month_name,
days => $date->days_in_month_year($month, $year),
year => $year,
lib/Calendar/Hijri.pm view on Meta::CPAN
});
}
=head2 as_svg($month, $year)
Returns calendar for the given C<$month> and C<$year> rendered in SVG format. If
C<$month> and C<$year> missing, it would return current calendar month.
=cut
sub as_svg {
my ($self, $month, $year) = @_;
($month, $year) = $self->validate_params($month, $year);
my $date = Date::Hijri::Simple->new({ year => $year, month => $month, day => 1 });
return $self->svg_calendar({
start_index => $date->day_of_week,
month_name => $date->get_month_name,
days => $date->days_in_month_year($month, $year),
year => $year });
}
lib/Calendar/Hijri.pm view on Meta::CPAN
=back
=head1 BUGS
Please report any bugs / feature requests to C<bug-calendar-hijri at rt.cpan.org>
or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Calendar-Hijri>.
I will be notified, and then you'll automatically be notified of progress on your
bug as I make changes.
=head1 SUPPORT
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Indonesia/Holiday.pm view on Meta::CPAN
_add_original_date($r, $opts);
$r->{ind_aliases} = [];
$r->{eng_aliases} = [];
$r->{is_holiday} = 1;
$r->{year_start} = 2003; # decreed in 2002 by megawati soekarnoputri
$r->{tags} = [qw/international calendar=lunar/];
($r);
}
sub _h_mawlid {
my ($r, $opts) = @_;
lib/Calendar/Indonesia/Holiday.pm view on Meta::CPAN
$r->{eng_name} = "Mawlid";
_add_original_date($r, $opts);
$r->{ind_aliases} = [qw/Maulud/];
$r->{eng_aliases} = ["Mawlid An-Nabi"];
$r->{is_holiday} = 1;
$r->{tags} = [qw/religious religion=islam calendar=lunar/];
($r);
}
sub _h_nyepi {
my ($r, $opts) = @_;
lib/Calendar/Indonesia/Holiday.pm view on Meta::CPAN
($opts->{hyear} ? " $opts->{hyear}":"");
_add_original_date($r, $opts);
$r->{ind_aliases} = ["Tahun Baru Saka"];
$r->{eng_aliases} = ["Bali New Year", "Bali Day Of Silence"];
$r->{is_holiday} = 1;
$r->{tags} = [qw/religious religion=hinduism calendar=saka/];
($r);
}
sub _h_goodfri {
my ($r, $opts) = @_;
lib/Calendar/Indonesia/Holiday.pm view on Meta::CPAN
$r->{eng_name} = "Isra And Miraj";
_add_original_date($r, $opts);
$r->{ind_aliases} = [];
$r->{eng_aliases} = [];
$r->{is_holiday} = 1;
$r->{tags} = [qw/religious religion=islam calendar=lunar/];
($r);
}
sub _h_eidulf {
my ($r, $opts) = @_;
lib/Calendar/Indonesia/Holiday.pm view on Meta::CPAN
$r->{eng_name} = $eng_name0.($opts->{day} ? " (Day $opts->{day})":"");
_add_original_date($r, $opts);
$r->{ind_aliases} = ["Lebaran"];
$r->{eng_aliases} = [];
$r->{is_holiday} = 1;
$r->{tags} = [qw/religious religion=islam calendar=lunar/];
($r);
}
sub _h_eidula {
my ($r, $opts) = @_;
lib/Calendar/Indonesia/Holiday.pm view on Meta::CPAN
$r->{eng_name} = "Eid Al-Adha";
_add_original_date($r, $opts);
$r->{ind_aliases} = ["Idul Kurban"];
$r->{eng_aliases} = [];
$r->{is_holiday} = 1;
$r->{tags} = [qw/religious religion=islam calendar=lunar/];
($r);
}
sub _h_hijra {
my ($r, $opts) = @_;
lib/Calendar/Indonesia/Holiday.pm view on Meta::CPAN
($opts->{hyear} ? " $opts->{hyear}H":"");
_add_original_date($r, $opts);
$r->{ind_aliases} = ["1 Muharam"];
$r->{eng_aliases} = [];
$r->{is_holiday} = 1;
$r->{tags} = [qw/calendar=lunar/];
($r);
}
sub _h_lelection {
my ($r, $opts) = @_;
lib/Calendar/Indonesia/Holiday.pm view on Meta::CPAN
days. If observe_joint_leaves is set to false, joint leave days are also counted
as working days.
_
my $meta = $res->[2]{meta};
$meta->{summary} = "List Indonesian holidays in calendar";
$meta->{description} = <<"_";
List holidays and joint leave days ("cuti bersama").
$TEXT_AVAILABLE_YEARS
lib/Calendar/Indonesia/Holiday.pm view on Meta::CPAN
ind_name => 'Maulid Nabi Muhammad',
eng_name => 'Mawlid',
eng_aliases => ['Mawlid An-Nabi'],
ind_aliases => ['Maulud'],
is_holiday => 1,
tags => [qw/religious religion=islam calendar=lunar/],
},
...
]];
This checks whether 2011-02-16 is a holiday:
lib/Calendar/Indonesia/Holiday.pm view on Meta::CPAN
Usage:
list_idn_holidays(%args) -> [$status_code, $reason, $payload, \%result_meta]
List Indonesian holidays in calendar.
List holidays and joint leave days ("cuti bersama").
Contains data from years 1990 to 2026
lib/Calendar/Indonesia/Holiday.pm view on Meta::CPAN
is_holiday=0, while the holidays themselves with is_holiday=1, so you can
differentiate/select both/either one.
=head2 When was joint leave established?
Joint leave was first decreed in 2001 [1] for the 2002 & 2003 calendar years.
The 2001 calendar year does not yet have joint leave days [2]. See also [3].
Websites that list joint leave days for 2001 or earlier years (example: [4],
[5]) are incorrect; by 2001 or earlier, these joint leave days had not been
officially decreed by the government.
[1] https://jdih.kemnaker.go.id/data_wirata/2002-4-4.pdf
lib/Calendar/Indonesia/Holiday.pm view on Meta::CPAN
[4] https://kalenderindonesia.com/libur/masehi/2001
[5] https://kalenderindonesia.com/libur/masehi/1991
=head2 What happens when multiple religious/holidays coincide on a single calendar day?
For example, in 1997, both Hijra and Ascension Day fall on May 8th. When this
happens, C<ind_name> and C<eng_name> will contain all the names of the holidays
separated by comma, respectively:
lib/Calendar/Indonesia/Holiday.pm view on Meta::CPAN
multiple => 1,
All the tags will be merged:
tags => ['religious', 'religion=christianity', 'calendar=lunar']
You can get each holiday's data in the C<holidays> key.
=head2 Data for older holidays?
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Japanese/Acme/Syukujitsu.pm view on Meta::CPAN
my $self,
my $year,
my $month => {optional => 1},
my $day => {optional => 1};
croak "$year is too old for Japanese government calendar." if $year < $self->min_year;
croak "$year is too new for Japanese government calendar." if $year > $self->max_year;
if (!$day and !$month) {
return $self->syukujitsus->{$year};
} elsif (!$day) {
return $self->syukujitsus->{$year}{$month};
lib/Calendar/Japanese/Acme/Syukujitsu.pm view on Meta::CPAN
my $self,
my $year,
my $month,
my $day;
croak "$year is too old for Japanese government calendar." if $year < $self->min_year;
croak "$year is too new for Japanese government calendar." if $year > $self->max_year;
return $self->syukujitsus->{$year}{$month}{$day};
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Japanese/Holiday.pm view on Meta::CPAN
# Examining whether it is holiday or not.
$name = isHoliday(2007, 5, 5);
=head1 DESCRIPTION
This module treats holidays information in Japanese calendar.
The list of holidays can be acquired, and you can examine whether
a day is holiday or not. You can acquire the holiday name too.
=head1 FUNCTIONS
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Julian.pm view on Meta::CPAN
}
}
=head1 DESCRIPTION
The Julian calendar was proclaimed by Julius Cesar in 46 B.C. and underwent
several modifications before reaching its final form in 8 C.E.The Julian calendar
differs from the Gregorian only in the determination of leap years, lacking the
correction for years divisible by 100 and 400 in the Gregorian calendar. In the
Julian calendar, any positive year is a leap year if divisible by 4. (Negative
years are leap years if the absolute value divided by 4 yields a remainder of 1.)
Days are considered to begin at midnight.
In the Julian calendar the average year has a length of 365.25 days. compared to
the actual solar tropical year of 365.24219878 days.The calendar thus accumulates
one day of error with respect to the solar year every 128 years. Being a purely
solar calendar, no attempt is made to synchronise the start of months to the
phases of the Moon.
+-----------------------------------------------------------------------------------+
| July [2017 BE] |
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
lib/Calendar/Julian.pm view on Meta::CPAN
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
| 31 | |
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
The package L<App::calendr> provides command line tool C<calendr> to display the
supported calendars on the terminal. Support for C<Julian Calendar> is provided
by L<App::calendr> v0.17 or above.
=head1 SYNOPSIS
use strict; use warnings;
use Calendar::Julian;
# prints current julian month calendar.
print Calendar::Julian->new, "\n";
print Calendar::Julian->new->current, "\n";
# prints julian month calendar in which the given julian day falls in.
print Calendar::Julian->new->from_julian(2457102.5), "\n";
# prints current month julian calendar in SVG format.
print Calendar::Julian->new->as_svg;
# prints current month julian calendar in text format.
print Calendar::Julian->new->as_text;
=head1 JULIAN MONTHS
+--------+------------------------------------------------------------------+
lib/Calendar/Julian.pm view on Meta::CPAN
=head1 METHODS
=head2 current()
Returns current month of the Julian calendar.
=cut
sub current {
my ($self) = @_;
lib/Calendar/Julian.pm view on Meta::CPAN
return $self->as_text($self->date->month, $self->date->year);
}
=head2 from_julian($julian_day)
Returns Julian month calendar in which the given C<$julian_day> falls in.
=cut
sub from_julian {
my ($self, $julian_day) = @_;
lib/Calendar/Julian.pm view on Meta::CPAN
return $self->as_text($date->month, $date->year);
}
=head2 as_svg($month, $year)
Returns calendar for the given C<$month> and C<$year> rendered in SVG format. If
C<$month> and C<$year> missing, it would return current calendar month.
=cut
sub as_svg {
my ($self, $month, $year) = @_;
($month, $year) = $self->validate_params($month, $year);
my $date = Date::Julian::Simple->new({ year => $year, month => $month, day => 1 });
return $self->svg_calendar(
{
start_index => $date->day_of_week,
month_name => $date->months->[$month],
days => $date->days_in_month_year($month, $year),
year => $year
});
}
=head2 as_text($month, $year)
Returns color coded Julian calendar for the given C<$month> and C<$year>. If
C<$month> and C<$year> missing, it would return current calendar month.
=cut
sub as_text {
my ($self, $month, $year) = @_;
($month, $year) = $self->validate_params($month, $year);
my $date = Date::Julian::Simple->new({ year => $year, month => $month, day => 1 });
return $self->text_calendar(
{
start_index => $date->day_of_week,
month_name => $date->get_month_name,
days => $date->days_in_month_year($month, $year),
day_names => $date->days,
lib/Calendar/Julian.pm view on Meta::CPAN
=back
=head1 BUGS
Please report any bugs / feature requests to C<bug-calendar-julian at rt.cpan.org>
or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Calendar-Julian>.
I will be notified, and then you'll automatically be notified of progress on your
bug as I make changes.
=head1 SUPPORT
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Functions.pm view on Meta::CPAN
#----------------------------------------------------------------------------
=head1 NAME
Calendar::Functions - A module containing functions for dates and calendars.
=head1 SYNOPSIS
use Calendar::Functions;
$ext = ext($day);
lib/Calendar/Functions.pm view on Meta::CPAN
fail_range($year);
=head1 DESCRIPTION
The module is intended to provide numerous support functions for other
date and/or calendar functions
=head1 EXPORT
ext, moty, dotw
lib/Calendar/Functions.pm view on Meta::CPAN
=over 4
=item L<The Calendar FAQ>
L<http://www.tondering.dk/claus/calendar.html>
=item L<The Perl Advent Entry>
2018-12-01 : L<http://perladvent.org/2018/2018-12-01.html>
view all matches for this distribution
view release on metacpan or search on metacpan
examples/calendar.pl view on Meta::CPAN
'2012-12-26' => 'Boxing Day',
};
my $template = Template->new({ INCLUDE_PATH => 'templates', POST_CHOMP=> 1,});
# process fullpage template, with events
$template->process('calendar.tt', {cal => $cal, events => $events, holidays => $holidays })
|| die $template->error();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Persian.pm view on Meta::CPAN
}
}
=head1 DESCRIPTION
The Persian calendar is solar, with the particularity that the year defined by
two successive, apparent passages of the Sun through the vernal (spring)
equinox. It is based on precise astronomical observations, and moreover uses a
sophisticated intercalation system, which makes it more accurate than its younger
European counterpart,the Gregorian calendar. It is currently used in Iran as the
official calendar of the country. The starting point of the current Iranian
calendar is the vernal equinox occurred on Friday March 22 of the year A.D. 622.
Persian Calendar for the month of Farvadin year 1390.
+---------------------------------------------------------------------------------------------------------------+
| Farvardin [1394 BE] |
+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
lib/Calendar/Persian.pm view on Meta::CPAN
+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
| 30 | 31 | |
+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
The package L<App::calendr> provides command line tool C<calendr> to display the
supported calendars on the terminal.
=head1 SYNOPSIS
use strict; use warnings;
use Calendar::Persian;
# prints current month calendar
print Calendar::Persian->new, "\n";
print Calendar::Persian->new->current, "\n";
# prints persian month calendar for the first month of year 1394.
print Calendar::Persian->new({ month => 1, year => 1394 }), "\n";
# prints persian month calendar in which the given gregorian date falls in.
print Calendar::Persian->new->from_gregorian(2015, 1, 14), "\n";
# prints persian month calendar in which the given julian date falls in.
print Calendar::Persian->new->from_julian(2457102.5), "\n";
# prints current month persian calendar in SVG format.
print Calendar::Persian->new->as_svg;
# prints current month persian calendar in text format.
print Calendar::Persian->new->as_text;
=head1 PERSIAN MONTHS
+-------+-------------------------------------------------------------------+
lib/Calendar/Persian.pm view on Meta::CPAN
=head1 METHODS
=head2 current()
Returns current month of the Persian calendar.
=cut
sub current {
my ($self) = @_;
lib/Calendar/Persian.pm view on Meta::CPAN
return $self->as_text($self->date->month, $self->date->year);
}
=head2 from_gregorian($year, $month, $day)
Returns persian month calendar in which the given gregorian date falls in.
=cut
sub from_gregorian {
my ($self, $year, $month, $day) = @_;
lib/Calendar/Persian.pm view on Meta::CPAN
return $self->from_julian($self->date->gregorian_to_julian($year, $month, $day));
}
=head2 from_julian($julian_date)
Returns persian month calendar in which the given julian date falls in.
=cut
sub from_julian {
my ($self, $julian_date) = @_;
lib/Calendar/Persian.pm view on Meta::CPAN
return $self->as_text($date->month, $date->year);
}
=head2 as_svg($month, $year)
Returns calendar for the given C<$month> and C<$year> rendered in SVG format. If
C<$month> and C<$year> missing, it would return current calendar month.
=cut
sub as_svg {
my ($self, $month, $year) = @_;
($month, $year) = $self->validate_params($month, $year);
my $date = Date::Persian::Simple->new({ year => $year, month => $month, day => 1 });
return $self->svg_calendar({
start_index => $date->day_of_week,
month_name => $date->get_month_name,
days => $date->days_in_month_year($month, $year),
year => $year });
}
=head2 as_text($month, $year)
Returns color coded Persian calendar for the given C<$month> and C<$year>. If
C<$month> and C<$year> missing, it would return current calendar month.
=cut
sub as_text {
my ($self, $month, $year) = @_;
($month, $year) = $self->validate_params($month, $year);
my $date = Date::Persian::Simple->new({ year => $year, month => $month, day => 1 });
return $self->text_calendar(
{
start_index => $date->day_of_week,
month_name => $date->get_month_name,
days => $date->days_in_month_year($month, $year),
day_names => $date->days,
lib/Calendar/Persian.pm view on Meta::CPAN
=back
=head1 BUGS
Please report any bugs or feature requests to C<bug-calendar-persian at rt.cpan.org>,
or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Calendar-Persian>.
I will be notified, and then you'll automatically be notified of progress on your
bug as I make changes.
=head1 SUPPORT
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Plugin/Renderer.pm view on Meta::CPAN
$Calendar::Plugin::Renderer::VERSION = '0.16';
$Calendar::Plugin::Renderer::AUTHORITY = 'cpan:MANWAR';
=head1 NAME
Calendar::Plugin::Renderer - Role to render calendar.
=head1 VERSION
Version 0.16
lib/Calendar/Plugin/Renderer.pm view on Meta::CPAN
use namespace::autoclean;
=head1 DESCRIPTION
Moo Role to render Calendar, currently in SVG and Text format only. This role is
taken by the following calendars:
=over 4
=item * L<Calendar::Bahai>
lib/Calendar/Plugin/Renderer.pm view on Meta::CPAN
use strict; use warnings;
use Cal;
my $cal = Cal->new;
print $cal->svg_calendar({
start_index => 5,
month_name => 'January',
days => 31,
year => 2016 });
print $cal->text_calendar({
start_index => 5,
month_name => 'January',
days => 31,
year => 2016 });
=head1 METHODS
=head2 text_calendar(\%params)
Returns the color coded calendar as a scalar string.
Expected paramaeters are as below:
+-------------+-------------------------------------------------------------+
| Key | Description |
lib/Calendar/Plugin/Renderer.pm view on Meta::CPAN
| day_names | Ref to a list of day name starting with Sunday. (Optional) |
+-------------+-------------------------------------------------------------+
=cut
sub text_calendar {
my ($self, $params) = @_;
unless (exists $params->{day_names}) {
$params->{day_names} = [qw(Sun Mon Tue Wed Thu Fri Sat)];
}
lib/Calendar/Plugin/Renderer.pm view on Meta::CPAN
my $line3 = $text->get_blocked_line;
my $line4 = $text->get_day_header;
my $empty = $text->get_empty_space;
my $dates = $text->get_dates;
my $calendar = join("\n", $line1, $line2, $line3, $line4, $line3, $empty.$dates)."\n";
return Term::ANSIColor::Markup->colorize($calendar);
}
=head2 svg_calendar(\%params)
Returns the requested calendar month in SVG format.
Expected paramaeters are as below:
+---------------+-----------------------------------------------------------+
| Key | Description |
lib/Calendar/Plugin/Renderer.pm view on Meta::CPAN
| adjust_height | Adjust height of the rows in Calendar. (Optional) |
+---------------+-----------------------------------------------------------+
=cut
sub svg_calendar {
my ($self, $params) = @_;
my $svg = Calendar::Plugin::Renderer::SVG->new($params);
$svg->process;
lib/Calendar/Plugin/Renderer.pm view on Meta::CPAN
=head2 validate_params($month, $year)
Validate given C<$month> and C<$year> as per the Calendar guidelines. C<$month>
can be "name" or "integer". If C<$month> is passed as "name" then it converts it
it into its "integer" equivalent. Both parameters are optional. In case they are
missing, it returns the current month and year of the selected calendar.
=cut
sub validate_params {
my ($self, $month, $year) = @_;
lib/Calendar/Plugin/Renderer.pm view on Meta::CPAN
Inspired by the package L<SVG::Calendar> so that it can be used as a plugin.
=head1 BUGS
Please report any bugs / feature requests to C<bug-calendar-plugin-renderer at rt.cpan.org>,
or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Calendar-Plugin-Renderer>.
I will be notified, and then you'll automatically be notified of progress on your
bug as I make changes.
=head1 SUPPORT
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Saka.pm view on Meta::CPAN
}
}
=head1 DESCRIPTION
Module to play with Saka calendar mostly used in the South indian, Goa and
Maharashatra. It supports the functionality to add / minus days, months and years
to a Saka date. It can also converts Saka date to Gregorian/Julian date.
The Saka eras are lunisolar calendars, and feature annual cycles of twelve lunar
months, each month divided into two phases: the 'bright half' (shukla) and the
'dark half' (krishna); these correspond respectively to the periods of the
'waxing' and the 'waning' of the moon. Thus, the period beginning from the first
day after the new moon and ending on the full moon day constitutes the shukla
paksha or 'bright half' of the month the period beginning from the day after the
full moon until & including the next new moon day constitutes the krishna paksha
or 'dark half' of the month.
The "year zero" corresponds to 78 BCE in the Saka calendar. The Saka calendar
begins with the month of Chaitra (March) and the Ugadi/Gudi Padwa festivals mark
the new year.
Each month in the Shalivahana calendar begins with the 'bright half' and is
followed by the 'dark half'. Thus, each month of the Shalivahana calendar ends
with the no-moon day and the new month begins on the day after that.
A variant of the Saka Calendar was reformed & standardized as the Indian National
calendar in 1957. This official calendar follows the Shalivahan Shak calendar in
beginning from the month of Chaitra and counting years with 78 CE being year zero.
It features a constant number of days in every month with leap years.Saka Calendar
for the month of Chaitra year 1937
+----------------------------------------------------------------------------------------------------------------------+
lib/Calendar/Saka.pm view on Meta::CPAN
+----------------+----------------+----------------+----------------+----------------+----------------+----------------+
| 29 | 30 | |
+----------------+----------------+----------------+----------------+----------------+----------------+----------------+
The package L<App::calendr> provides command line tool C<calendr> to display the
supported calendars on the terminal.
=head1 SYNOPSIS
use strict; use warnings;
use Calendar::Saka;
# prints current saka month calendar.
print Calendar::Saka->new->current, "\n";
# prints saka month calendar in which the given gregorian date falls in.
print Calendar::Saka->new->from_gregorian(2015, 4, 19), "\n";
# prints saka month calendar in which the given julian date falls in.
print Calendar::Saka->new->from_julian(2457102.5), "\n";
# prints current month saka calendar in SVG format.
print Calendar::Saka->new->as_svg;
# prints current month saka calendar in text format.
print Calendar::Saka->new->as_text;
=head1 SAKA MONTHS
+-------+-------------------------------------------------------------------+
lib/Calendar/Saka.pm view on Meta::CPAN
=head1 METHODS
=head2 current()
Returns current month of the Saka calendar.
=cut
sub current {
my ($self) = @_;
lib/Calendar/Saka.pm view on Meta::CPAN
return $self->as_text($self->date->month, $self->date->year);
}
=head2 from_gregorian()
Returns saka month calendar in which the given gregorian date falls in.
=cut
sub from_gregorian {
my ($self, $year, $month, $day) = @_;
lib/Calendar/Saka.pm view on Meta::CPAN
return $self->from_julian($self->date->gregorian_to_julian($year, $month, $day));
}
=head2 from_julian($julian_date)
Returns saka month calendar in which the given julian date falls in.
=cut
sub from_julian {
my ($self, $julian) = @_;
lib/Calendar/Saka.pm view on Meta::CPAN
return $self->as_text($date->month, $date->year);
}
=head2 as_svg($month, $year)
Returns calendar for the given C<$month> and C<$year> rendered in SVG format. If
C<$month> and C<$year> missing, it would return current calendar month.
=cut
sub as_svg {
my ($self, $month, $year) = @_;
($month, $year) = $self->validate_params($month, $year);
my $date = Date::Saka::Simple->new({ year => $year, month => $month, day => 1 });
return $self->svg_calendar(
{
start_index => $date->day_of_week,
month_name => $date->get_month_name,
days => $date->days_in_month_year($month, $year),
year => $year
});
}
=head2 as_text($month, $year)
Returns color coded Saka calendar for the given C<$month> and C<$year>. If
C<$month> and C<$year> missing, it would return current calendar month.
=cut
sub as_text {
my ($self, $month, $year) = @_;
($month, $year) = $self->validate_params($month, $year);
my $date = Date::Saka::Simple->new({ year => $year, month => $month, day => 1 });
return $self->text_calendar(
{
start_index => $date->day_of_week,
month_name => $date->get_month_name,
days => $date->days_in_month_year($month, $year),
day_names => $date->days,
lib/Calendar/Saka.pm view on Meta::CPAN
L<https://github.com/manwar/Calendar-Saka>
=head1 BUGS
Please report any bugs or feature requests to C<bug-calendar-saka at rt.cpan.org>,
or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Calendar-Saka>.
I will be notified, and then you'll automatically be notified of progress on your
bug as I make changes.
=head1 SUPPORT
view all matches for this distribution
view release on metacpan or search on metacpan
Schedule.pm view on Meta::CPAN
# Calendar::Schedule - Manage calendar schedules
# (c) 2002-2020 Vlado Keselj http://web.cs.dal.ca/~vlado vlado@dnlp.ca
# and contributing authors
#
# Some parts are updated with Starfish during development, such as the version
# number: <? read_starfish_conf !>
Schedule.pm view on Meta::CPAN
$REweekday3 = qr/Mon|Tue|Wed|Thu|Fri|Sat|Sun/;
$REmonth3 = qr/Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec/;
=head1 NAME
Calendar::Schedule - manage calendar schedules
=head1 SYNOPSIS
use Calendar::Schedule qw/:all/;
Schedule.pm view on Meta::CPAN
# manually adding an entry
$TTable->add_entry('2003-09-09 Tue 18-20 Some meeting');
# reading entries from a file
$TTable->add_entries_from("$ENV{'HOME'}/.calendar");
# producing entries in HTML tables, one table per week
$TTable->set_first_week('now');
print "<p>\n" . $TTable->generate_table();
print "<p>\n" . $TTable->generate_table();
print "<p>\n" . $TTable->generate_table();
# for more examples, see EXAMPLES section
The file .calendar may look like this:
# comments can start with #
* lines starting with * are treated as general todo entries ...
# empty lines are acceptable and ignored:
Schedule.pm view on Meta::CPAN
# more examples in "Example entries" section
=head1 DESCRIPTION
The module is created with a purpose to provide functionality for handling a
personal calendar schedule in a transparent and simple way. The calendar
data is assumed to be kept in a plain file in a format easy to edit and
understand. It was inspired by the C<calendar> program on older Unix-like
systems, which used C<~/.calendar> file to produce entries for each day
and send them in the morning by email.
Inspired by the C<~/.calendar> file, the format for recording scheduled
events is very simple, mostly contained in one line of text.
The module currently supports generation of HTML weekly tables with visual
representation of scheduled events. The generated table is generated in
a simple HTML table, with a use of C<colspan> and C<rolspan> attributes to
Schedule.pm view on Meta::CPAN
# manually adding an entry
$TTable->add_entry('2003-09-09 Tue 18-20 Some meeting');
# reading entries from a file
$TTable->add_entries_from("$ENV{'HOME'}/.calendar");
# producing entries in HTML tables
$TTable->set_first_week('2003-12-15');
print "<p>\n" . $TTable->generate_table();
print "<p>\n" . $TTable->generate_table();
Schedule.pm view on Meta::CPAN
return $starttime;
}
=item parse_time(time_specification[,prefix])
Parses time specification and returns the calendar time (see mktime in
Perl). The functions dies if the time cannot be completely recognized.
If prefix is set to true (1), then only a prefix of the string can be
a time specification. If prefix is set to 1, then in an array context
it will return a 2-element list: the calendar time and the
remainder of the string. Format examples:
2004-03-17
now
Mar 8, 2004
Schedule.pm view on Meta::CPAN
The latest version can be found at
L<http://vlado.ca/srcperl/Calendar-Schedule/>.
=head1 SEE ALSO
There are some Perl modules for different types of calendar, and
likely may more in other programming languages. I could not find any
existing calendars including the particular features that I needed, so
this module was created. Below are some modules with similar
functionality:
=over 4
Schedule.pm view on Meta::CPAN
The module is written as a simplifed version of HTML::CalendarMonth.
The intention for this, Calendar::Schedule module, is not to tie it essentially
for HTML. The events specification is described in a simple textual format.
=item [HTML::CalendarMonth] - Generate and manipulate HTML calendar months
The module HTML::CalendarMonth is a subclass of HTML::ElementTable,
which makes it a part of larger project--the Date-Time Perl project at
F<http://datetime.perl.org>.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Simple.pm view on Meta::CPAN
# $Id$
=head1 NAME
Calendar::Simple - Perl extension to create simple calendars
=head1 SYNOPSIS
use Calendar::Simple;
my @curr = calendar; # get current month
my @this_sept = calendar(9); # get 9th month of current year
my @sept_2002 = calendar(9, 2002); # get 9th month of 2002
my @monday = calendar(9, 2002, 1); # get 9th month of 2002,
# weeks start on Monday
my @span = date_span(mon => 10, # returns span of dates
year => 2006,
begin => 15,
lib/Calendar/Simple.pm view on Meta::CPAN
use strict;
use warnings;
use base 'Exporter';
our @EXPORT = qw(calendar);
our @EXPORT_OK = qw(date_span);
our $VERSION = '2.1.0';
use Time::Local;
use Carp;
lib/Calendar/Simple.pm view on Meta::CPAN
my @days = qw(31 xx 31 30 31 30 31 31 30 31 30 31);
=head1 DESCRIPTION
A very simple module that exports one function called C<calendar>.
=head2 calendar
This function returns a data structure representing the dates in a month.
The data structure returned is an array of array references. The first
level array represents the weeks in the month. The second level array
contains the actual days. By default, each week starts on a Sunday and
lib/Calendar/Simple.pm view on Meta::CPAN
week starts with, with the same values as localtime sets for wday
(namely, 0 for Sunday, 1 for Monday and so on).
=cut
sub calendar {
my ($mon, $year, $start_day) = _validate_params(@_);
my $first = _get_first($mon, $year, $start_day);
my @mon = (1 .. _days($mon, $year));
lib/Calendar/Simple.pm view on Meta::CPAN
if omitted.
=item start_day
Indicates the day of the week that each week starts with. This takes the same
values as the optional third parameter to C<calendar>. The default is 1
(for Monday).
B<NOTE:> As of version 2.0.0, the default C<start_day> has changed. Previously,
it was Sunday; now, it is Monday. This is so the default behaviour matches
that of the standard Unix C<cal> command.
lib/Calendar/Simple.pm view on Meta::CPAN
);
my $begin = $params{begin} || 1;
my $end = $params{end} || _days($mon, $year);
my @cal = calendar($mon, $year, $start_day);
shift @cal while $cal[0][6] < $begin;
my $i = 0;
while (defined $cal[0][$i] and $cal[0][$i] < $begin) {
lib/Calendar/Simple.pm view on Meta::CPAN
my $mon = shift // (localtime)[4] + 1;
my $yr = shift // (localtime)[5] + 1900;
my $sd = shift // 1;
my @month = calendar($mon, $yr, $sd);
print "\n$months[$mon -1] $yr\n\n";
my @days = qw(Su Mo Tu We Th Fr Sa);
push @days, splice @days, 0, $sd;
print "@days\n";
lib/Calendar/Simple.pm view on Meta::CPAN
can't deal with dates before 1970 and it will also have problems with dates
after 2038 on a 32-bit machine.
=head2 EXPORT
C<calendar>
=head1 AUTHOR
Dave Cross <dave@mag-sol.com>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Slots.pm view on Meta::CPAN
my $slot = $cal->find( date=>'2009-10-11', time=>'11:00' );
print $slot->name; # 'busy'
=head1 DESCRIPTION
This is a simple module to manage a calendar of very generic time slots. Time slots are anything
with a start and end time on a given date or weekday. Time slots cannot overlap. If a new
time slot overlaps another pre-existing time slot, the calendar will acommodate the slot automatically.
It handles two types of slots: fixed dates, or recurring on weekdays.
When looking for an event, it will search from most specific (date) to more
generic (recurring). That is, if a slot exist for both a date and a weekday,
it returns the date slot only.
The calendar is able to compact itself and generate rows that can be easily
stored in a file or database.
=head1 LIMITATIONS
Some of it current limitations:
lib/Calendar/Slots.pm view on Meta::CPAN
=head1 METHODS
=head2 slot ( name=>Str, { date=>'YYYY-MM-DD' | weekday=>1..7 | start_date/end_date }, start=>'HH:MM', end=>'HH:MM' )
Add a time slot to the calendar.
If the new time slot overlaps an existing slot with the same C<name>,
the slots are merged and become a single slot.
If the new time slot overlaps an existing slot with a different C<name>,
lib/Calendar/Slots.pm view on Meta::CPAN
# create a time slot for a given date
$cal->slot( date=>'2009-01-01', start=>'10:30', end=>'24:00' );
# create a recurring time slot over 3 calendar days
$cal->slot( start_date=>'2009-01-01', end_date=>'2009-02-01', start=>'10:30', end=>'24:00' );
=head2 find ( { date=>'YYYY-MM-DD' | weekday=>1..7 }, time=>'HH:MM' )
lib/Calendar/Slots.pm view on Meta::CPAN
Shortcut method to L<find|/find> a slot and return a name.
=head2 sorted
Returns a ARRAY of all slot objects in the calendar.
=head2 materialize ( start_date, end_date )
Returns an instance of L<Calendar::Slots> with
date slots converted into weekdays for a given
lib/Calendar/Slots.pm view on Meta::CPAN
my $week = $cal->week_of( 2012_10_22 );
$week->find( weekday=>2, time=>10_30 ); # ...
=head2 all
Returns an ARRAY of all slot objects in the calendar.
=head2 as_table
Returns a console string as a table for the calendar.
Requires that L<Data::Format::Pretty::Console> be installed.
print $cal->as_table;
lib/Calendar/Slots.pm view on Meta::CPAN
=over
=item * Other types of recurrence: first Monday, last Friday of September...
=item * Merge several calendars into one.
=item * Create subclasses of Calendar::Slots::Slot for each slot type.
=item * Better input formatting based on DateTime objects and the such.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/form/DateTime.js view on Meta::CPAN
// FIX ME: should be derived from Qooxdoo DateField.
/**
* A *date field* is like a combo box with the date as popup. As button to
* open the calendar a calendar icon is shown at the right to the datefield.
*
* In addition a time textfield.
*
* To be conform with all form widgets, the {@link qx.ui.form.IForm} interface
* is implemented.
lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/form/DateTime.js view on Meta::CPAN
/**
* This method sets the date, which will be formatted according to
* #dateFormat to the date field. It will also select the date in the
* calendar popup.
*
* @param value {Date} The date to set.
*/
setValue : function(value)
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalog.pm view on Meta::CPAN
return $self->stemplate_build($template);
}
#
# HTML display a data catalog calendar
#
sub cdate_index {
my($self, $template, $interval, $spec, @specs) = @_;
# warn("from = $interval->{'from'} => to = $interval->{'to'}");
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/ActionRole/JSV.pm view on Meta::CPAN
=back
Catalyst Advent Calendar 2013 / How to implement a super-simple REST API with Catalyst
http://www.catalystframework.org/calendar/2013/26
=head1 AUTHOR
Masaaki Saito E<lt>masakyst.public@gmail.comE<gt>
view all matches for this distribution
view release on metacpan or search on metacpan
share/ext/resources/images/default/s.gif
share/ext/resources/images/default/shadow-c.png
share/ext/resources/images/default/shadow-lr.png
share/ext/resources/images/default/shadow.png
share/ext/resources/images/default/shared/blue-loading.gif
share/ext/resources/images/default/shared/calendar.gif
share/ext/resources/images/default/shared/glass-bg.gif
share/ext/resources/images/default/shared/hd-sprite.gif
share/ext/resources/images/default/shared/large-loading.gif
share/ext/resources/images/default/shared/left-btn.gif
share/ext/resources/images/default/shared/loading-balls.gif
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Manual/Cookbook.pod view on Meta::CPAN
$c->forward('view'); # get the entries
my $feed = XML::Feed->new('RSS');
$feed->title( $c->config->{name} . ' RSS Feed' );
$feed->link( $c->req->base ); # link to the site.
$feed->description('Catalyst advent calendar'); Some description
# Process the entries
while( my $entry = $c->stash->{entries}->next ) {
my $feed_entry = XML::Feed::Entry->new('RSS');
$feed_entry->title($entry->title);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Model/Search/ElasticSearch.pm view on Meta::CPAN
=over
=item *
The Catalyst Advent article on integrating Elasticsearch into your app: L<http://www.catalystframework.org/calendar/2010/2>
=item *
L<Search::Elasticsearch|Search::Elasticsearch> - Elasticsearch interface this
model provides access to
view all matches for this distribution