public class PersianCalendarHelper1 extends Object
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 and Description |
|---|
PersianCalendarHelper1() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.Copyright © 2015. All Rights Reserved.