The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Mira::Date::Jalali - Perl extension for converting Gregorian Dates and Jalali Date to each other

SYNOPSIS

  use Mira::Date::Jalali;
  my $date = Mira::Date::Jalali->new
  (
    year => 1395,
    month => 11,
    day => 12
  );
  $year = $date->gregorian->{year};   #2017
  $month = $date->gregorian->{month}; #1
  $day = $date->gregorian->{day};     #31



  use Mira::Date::Jalali;
  my $date = Mira::Date::Jalali->new
  (
    year => 2017,
    month => 1,
    day => 31
  );
  $year = $date->jalali->{year};   #1395
  $month = $date->jalali->{month}; #11
  $day = $date->jalali->{day};     #12

ABSTRACT

This module converts Gregorian date to Jalali and Jalali date to Gregorian.

DESCRIPTION

this module is a rewrite for Date::Jalali2 for use in mira (mira is a content manager framework)

EXPORT

gregorian

  use Mira::Date::Jalali;
  $gre_date = gregorian({
    year => 1395,
    month => 11,
    day => 12
  });
  print $gre_date->{year};       #2017

jalali

  use Mira::Date::Jalali;
  $jal_date = jalali({
    year => 2017,
    month => 1,
    day => 31
  });
  print $jal_date->{year};       #1395

SEE ALSO

Date::jalali2

CHANGE LOG

add export itemsq

separate methods

AUTHOR

Kiavash

Ahmad Anvari <http://www.anvari.org/bio/>

Redistributed by : Ehsan Golpayegani <http://www.golpayegani.com>

COPYRIGHT AND LICENSE

Copyright 2017 by Kiavash

The original algorithm was written with regards to Gregorian<->Jalali convertor developed by Roozbeh Pournader and Mohammad Toossi available at:

http://www.farsiweb.info/jalali/jalali.c

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.