|
|||||||||
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.VictoriaDay
public final class VictoriaDay
Calculate when Victoria day occurs.
Specific holiday calculator Info from http://www.pch.gc.ca/ceremonial-symb/english/day_vic.html May 24, Queen Victoria's birthday, was declared a holiday by the Legislature of the Province of Canada in 1845. After Confederation, the Queen's birthday was celebrated every year on May 24 unless that date was a Sunday, in which case a proclamation was issued providing for the celebration on May 25. After the death of Queen Victoria in 1901, an Act was passed by the Parliament of Canada establishing a legal holiday on May 24 in each year (or May 25 if May 24 fell on a Sunday) under the name Victoria Day. Canada continued to observe Victoria Day. An amendment to the Statutes of Canada in 1952 established the celebration of Victoria Day on the Monday preceding May 25.
Field Summary |
---|
Fields inherited from class com.mindprod.holidays.HolInfo |
---|
ACTUAL, DEBUGGING, OBSERVED, PROCLAIMED, SHIFTED |
Constructor Summary | |
---|---|
VictoriaDay()
|
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. |
int |
when(int year,
boolean shift,
int base)
When was this holiday in a given year? |
Methods inherited from class com.mindprod.holidays.HolInfo |
---|
isYearValid, shiftSatToFriSunToMon, when, when |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VictoriaDay()
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)
HolInfo
when
in class HolInfo
year
- (-ve means BC, +ve means AD, 0 not permitted.)shift
- ACTUAL = false if you want the actual date of the holiday. SHIFTED = true if you want the date taken
off work, usually the nearest weekday.base
- PROCLAIMED=based on date holiday was officially proclaimed CELEBRATED=based on date holiday was
first celebrated
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |