30 Aug 2003 14:45:23 UTC
- Distribution: DateTime-Calendar-Hijri
- Module version: 0.00
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (900 / 363 / 0)
- KwaliteeBus factor: 1
- 87.50% Coverage
- License: unknown
- Activity24 month
- Download (10.4KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionPIJLL Eugene van der Pijll
DateTime::Calendar::Hijri - Dates in the Hijri (Islamic) calendar
use DateTime::Calendar::Hijri; $dt = DateTime::Calendar::Hijri->new( year => 1424, month => 1, day => 1); $year = $dt->year; # 1424 $month = $dt->month; # 1 $day = $dt->day; # 1 $str = $dt->datetime; # "1424-1-1 AH" $dt = DateTime::Calendar::Hijri->from_object( object => $datetime_obj );
The Hijri calendar is based on the flight of Mohammed from Mecca to Medina in the year 622 in the Gregorian calendar. This was taken as the start of the new calendar, which is still used in a number of Islamic countries.
Like the Gregorian calendar, the Hijri year consists of 12 months. The start of each month is determined by the observation of the young moon. This means that the Hijri calendar is not predictable: it is not known beforehand when a new month will start. Several algorithms have been written to predict the starting days of the month, and one of them is used by this module. The calculated dates can therefore be one or two days off the actual dates.
new( ... )
Creates a new Hijri date object. Possible parameters are "year", "month" and "day".
year , month , day
Return parts of a Hijri date.
Returns a string representing the Hijri date.
from_object( object => ... )
Creates a Hijri date from another datetime compatible object.
Returns the rata die count of days. This is used to convert from a Hijri date to another calendar
The dates are sometimes wrong by one or two days when you convert to or from other calendars. This can't be helped, as the Hijri calendar is based on observations, not on an algorithm.
The functionality offered by this module is rather minimal compared to other calendar modules within the DateTime project. This is because I am not very familiar with the Hijri calendar, and I feel I am unable to do it justice. If you can, and if you are willing to put some time into improving this module, I would be glad to hand over the maintainership. Mail me!
Support for this module is provided via the firstname.lastname@example.org email list. See http://lists.perl.org/ for more details.
Eugene van der Pijll <email@example.com>
This module uses the Date::Hijri module by Alex Pleiner for all calculations.
Copyright (c) 2003 Eugene van der Pijll. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
firstname.lastname@example.org mailing list
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 121:
You forgot a '=back' before '=head1'
- Around line 123:
'=item' outside of any '=over'
Module Install Instructions
To install DateTime::Calendar::Hijri, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install DateTime::Calendar::Hijri
For more information on module installation, please visit the detailed CPAN module installation guide.