Skip to content
Jalali Calendar for java
Java
Branch: master
Clone or download
Latest commit 0c6f464 Aug 8, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src added more constructors Jul 16, 2018
.gitignore Update .gitignore Dec 4, 2017
README.md Update README.md Aug 8, 2018
build.gradle changed release version Aug 5, 2018
settings.gradle jalali calendar with some tests Apr 16, 2016

README.md

JalaliCalendar

JalaliCalendar is a Persian Calendar for java inspired from Roozh project. It has a better API and it's more developer friendly

Add to Project

JalaliCalendar is available in central maven repository. add mavenCentral() to your repository list in build.gradle. Then add this line to your dependencies:

compile 'ir.huri:JalaliCalendar:1.3.3'

Getting Started

First of all I should note that java gregorian calenders month is 0 base

To Create a Jalali Date with specified year, month, day use the constructor :

JalaliCalendar jalaliCalendar = new JalaliCalendar(1395, 1, 28); 

To Covert a Gregorian Date to Jalali :

JalaliCalendar jalaliDate = new JalaliCalendar(new GregorianCalendar(2016, 4, 16)); 

To Convert a Jalali Date to Gregorian Date :

JalaliCalendar jalaliCalendar = new JalaliCalendar(1395, 1, 28);
GregorianCalendar gc = jalaliCalendar.toGregorian(); 

Read more examples in test files.

You can’t perform that action at this time.