Skip to content

Commit

Permalink
Correct the constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
amirmehdizadeh committed Jul 29, 2013
1 parent 695c8d6 commit 96a9303
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/samanpr/jalalicalendar/JalaliCalendar.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public JalaliCalendar(TimeZone zone, Locale aLocale) {

YearMonthDate yearMonthDate = new YearMonthDate(calendar.get(YEAR), calendar.get(MONTH), calendar.get(DATE));
yearMonthDate = gregorianToJalali(yearMonthDate);
super.set(yearMonthDate.getYear(), yearMonthDate.getMonth(), yearMonthDate.getDate());
set(yearMonthDate.getYear(), yearMonthDate.getMonth(), yearMonthDate.getDate());
complete();

}
Expand Down Expand Up @@ -169,7 +169,7 @@ public JalaliCalendar(int year, int month, int dayOfMonth, int hourOfDay,

public static YearMonthDate gregorianToJalali(YearMonthDate gregorian) {

if(gregorian.getMonth()>11 || gregorian.getMonth()<-11){
if (gregorian.getMonth() > 11 || gregorian.getMonth() < -11) {
throw new IllegalArgumentException();
}
int jalaliYear;
Expand Down Expand Up @@ -221,7 +221,7 @@ public static YearMonthDate gregorianToJalali(YearMonthDate gregorian) {


public static YearMonthDate jalaliToGregorian(YearMonthDate jalali) {
if(jalali.getMonth()>11 || jalali.getMonth()<-11){
if (jalali.getMonth() > 11 || jalali.getMonth() < -11) {
throw new IllegalArgumentException();
}

Expand Down

0 comments on commit 96a9303

Please sign in to comment.