Mira::Date::Jalali - Perl extension for converting Gregorian Dates and Jalali Date to each other
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
This module converts Gregorian date to Jalali and Jalali date to Gregorian.
this module is a rewrite for Date::Jalali2 for use in mira (mira is a content manager framework)
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
Date::jalali2
add export itemsq
separate methods
kiamazi kiavash@cpan.org
kiavash@cpan.org
Redistributed by : Ehsan Golpayegani <http://www.golpayegani.com>
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.
To install Mira, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mira
CPAN shell
perl -MCPAN -e shell install Mira
For more information on module installation, please visit the detailed CPAN module installation guide.