The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

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

kiamazi kiavash@cpan.org

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.