|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.util.DateTimeIso8601Utils
public class DateTimeIso8601Utils
Calculate day of week, week of year and year according to the ISO 8601 specification. See also http://en.wikipedia.org/wiki/ISO_8601
The specification defines that the week starts at Monday. The first week of the year is defined as the week which contains at least 4 days of the new year. Therefore if January 1st is on Thursday (or earlier) it belongs to the first week, otherwise to the last week of the previous year. Hence January 4th always belongs to the first week while the December 28th always belongs to the last week. The year of a date reflects to this corresponding week definition.
Constructor Summary | |
---|---|
DateTimeIso8601Utils()
|
Method Summary | |
---|---|
static int |
getIsoDayOfWeek(java.util.Date date)
Return the day of week. |
static int |
getIsoWeek(java.util.Date date)
Returns the week of the year. |
static int |
getIsoYear(java.util.Date date)
Returns the year according to the ISO week definition. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DateTimeIso8601Utils()
Method Detail |
---|
public static int getIsoDayOfWeek(java.util.Date date)
date
- the date object which day of week should be calculated
public static int getIsoWeek(java.util.Date date)
date
- the date object which week of year should be calculated
public static int getIsoYear(java.util.Date date)
date
- the date object which year should be calculated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |