|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ghasemkiani.util.PersianCalendarHelper1
This class is an illustration of the algorithm used for calculation of leap
years in the arithmetic version of the Persian calendar system. This class
is not actually used by other classes, but it can poractically substitute
the
class. The difference is that this
class does not use algebraic formulas, but instead creates a table of
year start days according to the algorithm. I have tested this class and it
seems to be equivalent to the PersianCalendarHelper
class, but
its performance is lower.PersianCalendarHelper
This class is kept here just as an illustration of the algorithm. Please see the source file for more information.
Constructor Summary | |
---|---|
PersianCalendarHelper1()
|
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 day in the Persian calendar. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PersianCalendarHelper1()
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 |