public class WeekDate extends IsoDate
ISO 8601 defines week numbers in the following way. The week with the year's first Thursday in it is called week 01. Weeks are numbered from 01 to 52 or 53.
ISO 8601 also defines numbers for day of week. Monday is number 1, Tuesday number 2 and so on up to Sunday which is number 7. Use the Weekday enumeration to convert between day numbers and day names.
Constructor | Description |
---|---|
WeekDate(Integer year,
Integer week,
Weekday dayOfWeek) |
Creates a new week date with the specified year, week and day of week.
|
Modifier and Type | Method | Description |
---|---|---|
Weekday |
dayOfWeek() |
|
boolean |
equals(Object o) |
|
int |
hashCode() |
|
String |
toString() |
Returns this date in ISO 8601 format.
|
TimePoint |
toTimePoint(Time t,
TimeZone tz) |
Returns a point in time represented by this date and a supplied
time of day.
|
Integer |
week() |
|
Integer |
year() |
public WeekDate(Integer year, Integer week, Weekday dayOfWeek)
year
- The year. May not be null.week
- The week number according to ISO 8601. May be null.dayOfWeek
- The weekday according to ISO 8601. May be null.public Integer year()
public Integer week()
public Weekday dayOfWeek()
public String toString()
IsoDate
public TimePoint toTimePoint(Time t, TimeZone tz)
IsoDate
toTimePoint
in class IsoDate
t
- A time of day. May be null.tz
- The timezone.Copyright © 2020 Apptus Technologies AB. All rights reserved.