-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from aliab/dev
Fix jitpack build issue
- Loading branch information
Showing
12 changed files
with
162 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ | |
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
-keep ir.hamsaa.** |
40 changes: 40 additions & 0 deletions
40
persiandatepicker/src/main/java/ir/hamsaa/persiandatepicker/api/PersianPickerDate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package ir.hamsaa.persiandatepicker.api; | ||
|
||
import java.util.Date; | ||
|
||
public interface PersianPickerDate { | ||
|
||
void setDate(Long timestamp); | ||
|
||
void setDate(Date date); | ||
|
||
void setDate(int persianYear, int persianMonth, int persianDay); | ||
|
||
int getPersianYear(); | ||
|
||
int getPersianMonth(); | ||
|
||
int getPersianDay(); | ||
|
||
int getGregorianYear(); | ||
|
||
int getGregorianMonth(); | ||
|
||
int getGregorianDay(); | ||
|
||
int getDayOfWeek(); | ||
|
||
String getPersianMonthName(); | ||
|
||
String getPersianDayOfWeekName(); | ||
|
||
/** | ||
* @return String of Persian Date ex: دوشنبه ۱۳ خرداد ۱۳۷۰ | ||
*/ | ||
String getPersianLongDate(); | ||
|
||
Date getGregorianDate(); | ||
|
||
long getTimestamp(); | ||
|
||
} |
39 changes: 0 additions & 39 deletions
39
persiandatepicker/src/main/java/ir/hamsaa/persiandatepicker/api/PersianPickerDate.kt
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
persiandatepicker/src/main/java/ir/hamsaa/persiandatepicker/api/PersianPickerListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package ir.hamsaa.persiandatepicker.api; | ||
|
||
public interface PersianPickerListener { | ||
|
||
void onDateSelected(PersianPickerDate persianPickerDate); | ||
|
||
void onDismissed(); | ||
} |
8 changes: 0 additions & 8 deletions
8
persiandatepicker/src/main/java/ir/hamsaa/persiandatepicker/api/PersianPickerListener.kt
This file was deleted.
Oops, something went wrong.
92 changes: 92 additions & 0 deletions
92
persiandatepicker/src/main/java/ir/hamsaa/persiandatepicker/date/PersianDateImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
package ir.hamsaa.persiandatepicker.date; | ||
|
||
import java.util.Date; | ||
|
||
import ir.hamsaa.persiandatepicker.api.PersianPickerDate; | ||
import saman.zamani.persiandate.PersianDate; | ||
|
||
public class PersianDateImpl implements PersianPickerDate { | ||
|
||
private PersianDate persianDate; | ||
|
||
public PersianDateImpl() { | ||
persianDate = new PersianDate(); | ||
} | ||
|
||
@Override | ||
public void setDate(Long timestamp) { | ||
persianDate = new PersianDate(timestamp); | ||
} | ||
|
||
@Override | ||
public void setDate(Date date) { | ||
persianDate = new PersianDate(date); | ||
} | ||
|
||
@Override | ||
public void setDate(int persianYear, int persianMonth, int persianDay) { | ||
persianDate.setShYear(persianYear); | ||
persianDate.setShMonth(persianMonth); | ||
persianDate.setShDay(persianDay); | ||
} | ||
|
||
@Override | ||
public int getPersianYear() { | ||
return persianDate.getShYear(); | ||
} | ||
|
||
@Override | ||
public int getPersianMonth() { | ||
return persianDate.getShMonth(); | ||
} | ||
|
||
@Override | ||
public int getPersianDay() { | ||
return persianDate.getShDay(); | ||
} | ||
|
||
@Override | ||
public int getGregorianYear() { | ||
return persianDate.getGrgYear(); | ||
} | ||
|
||
@Override | ||
public int getGregorianMonth() { | ||
return persianDate.getGrgMonth(); | ||
} | ||
|
||
@Override | ||
public int getGregorianDay() { | ||
return persianDate.getGrgDay(); | ||
} | ||
|
||
@Override | ||
public int getDayOfWeek() { | ||
return persianDate.dayOfWeek(); | ||
} | ||
|
||
@Override | ||
public String getPersianMonthName() { | ||
return persianDate.monthName(); | ||
} | ||
|
||
@Override | ||
public String getPersianDayOfWeekName() { | ||
return persianDate.dayName(); | ||
} | ||
|
||
@Override | ||
public String getPersianLongDate() { | ||
return getPersianDayOfWeekName() + " " + getPersianDay() + " " + getPersianMonthName() + " " + getPersianYear(); | ||
} | ||
|
||
@Override | ||
public Date getGregorianDate() { | ||
return persianDate.toDate(); | ||
} | ||
|
||
@Override | ||
public long getTimestamp() { | ||
return persianDate.getTime(); | ||
} | ||
} |
Oops, something went wrong.