Date::Hijri(3pm)

Date::Hijri3pm

Perl extension to convert islamic (hijri) and gregorian dates.

Usage

  use Date::Hijri;
  # convert gregorian to hijri date
  my ($hd, $hm, $hy) = g2h($gd, $gm, $gy);
  # convert hijri to gregorian date
  my ($gd, $gm, $gy) = h2g($hd, $hm, $hy);

Overview

This simple module converts gregorian dates to islamic (hijri) and vice versa.

The dates must be given as an array containing the day, month and year, and return the corresponding date as a list with the same elements.

Examples

  #!/usr/bin/perl -w
  use Date::Hijri;
  print join("-", g2h(22,8,2003));  # prints 23-6-1424
  print join("-", h2g(23,6,1424));  # prints 22-8-2003

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)

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 2 times.

  1. 6.0–9
  2. 10–11
  3. 12–13

Author

Alex Pleiner, <[email protected]>

From libdate-hijri-perl 0.02-4 in Debian 13 (Trixie). Parsed by carta from the page's man source.