|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindprod.holidays.HolInfo
com.mindprod.holidays.ChristmasUSA
public final class ChristmasUSA
calculate when Christmas day occurs in the USA.
Field Summary |
---|
Fields inherited from class com.mindprod.holidays.HolInfo |
---|
ACTUAL, DEBUGGING, OBSERVED, PROCLAIMED, SHIFTED |
Constructor Summary | |
---|---|
ChristmasUSA()
|
Method Summary | |
---|---|
java.lang.String |
getAuthority()
authority who provided the information about the holiday. |
int |
getFirstYear(int base)
Get year holiday first proclaimed or first celebrated. |
java.lang.String |
getName()
Get name of holiday e.g. |
java.lang.String |
getRule()
Get rule in English for how the holiday is calculated. |
static void |
main(java.lang.String[] args)
Test driver |
int |
when(int year,
boolean shift,
int base)
Nominally, Christmas is on the 25 in the USA. |
Methods inherited from class com.mindprod.holidays.HolInfo |
---|
isYearValid, when, when |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChristmasUSA()
Method Detail |
---|
public java.lang.String getAuthority()
HolInfo
getAuthority
in class HolInfo
public int getFirstYear(int base)
HolInfo
getFirstYear
in class HolInfo
base
- PROCLAIMED=based on date holiday was officially proclaimed. CELEBRATED=based on date holiday was
first celebrated.
public java.lang.String getName()
HolInfo
getName
in class HolInfo
public java.lang.String getRule()
HolInfo
getRule
in class HolInfo
public int when(int year, boolean shift, int base)
when
in class HolInfo
year
- (-ve means BC, +ve means AD, 0 not permitted.)shift
- true if want date of holiday shifted to nearest weekday.base
- PROCLAIMED=based on date holiday was officially proclaimed CELEBRATED=based on date holiday was
first celebrated
public static void main(java.lang.String[] args)
args
- not used
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |