|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ghasemkiani.util.PersianCalendarHelper
This class contains algorithms for converting Julian days to the Persian calendar system, and vice versa. The algorithms have been rewritten and some bugs in the Java code have been corrected, but, originally, they have been based on the "Calendar Math Add-In for Excel" by Kees Couprie, whose contribution is gratefully acknowledged.
Constructor Summary | |
---|---|
PersianCalendarHelper()
|
Method Summary | |
---|---|
static boolean |
isLeapYear(long year)
Determines if the specified year is a leap year in the Persian calendar. |
static long |
jp(long j)
Returns the date in the Persian calendar corresponding to the specified Julian day. |
static long |
pj(long y,
int m,
int d)
Returns the Julian day corresponding to the specified date in the Persian calendar. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PersianCalendarHelper()
Method Detail |
---|
public static boolean isLeapYear(long year)
year
- the "Persian" year.
true
if year
is a leap year, false
otherwise.public static long pj(long y, int m, int d)
y
- the Persian year.m
- the Persian month.d
- the Persian day.
public static long jp(long j)
PersianCalendarUtils
class for extraction of fields from the packed long value.
j
- the Julian day.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |