Razeghi71 JalaliCalendar Save

Jalali Calendar for java

Project README

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:<version>'

Getting Started

First of all I should note that JAVA GREGORIAN CALENDERS MONTH IS 0 BASE SO JANUARY IS 0, FEBRUARY is 1, ...

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.

Open Source Agenda is not affiliated with "Razeghi71 JalaliCalendar" Project. README Source: razeghi71/JalaliCalendar
Stars
78
Open Issues
1
Last Commit
4 months ago

Open Source Agenda Badge

Open Source Agenda Rating