public class Week extends Time2
Time2 with day resolution and a cycle of 6 days OFF and 1 day
ON. The ON day is Thursday. This means
that when creating a Week using a date other than a Thursday, the
Adjustment is important. An UP adjustment will
advance to the next Thursday and a DOWN adjustment will backtrack to the
previous one.
Using Thursday to identify weeks has advantages. This is a quote from a Wikipedia article on ISO 8601, the international date standard:
The week number can be described by counting the Thursdays: week 12 contains the 12th Thursday of the year.The domain label is weekly.
| Modifier and Type | Field and Description |
|---|---|
static TimeDomain |
DOMAIN
A constant holding the domain.
|
static String |
LABEL
A constant holding the domain label.
|
| Constructor and Description |
|---|
Week(long year,
int month,
int day,
Adjustment adjust)
Construct a
weeklytime from the given time components. |
Week(String date,
Adjustment adjust)
Construct a
weeklytime from a string. |
Week(TimeIndex time)
Construct a
weeklytime from another time object. |
public static final String LABEL
public static final TimeDomain DOMAIN
public Week(TimeIndex time) throws T2Exception
weeklytime from another time object.
time - a non-null time in the domain weekly
T2Exceptionpublic Week(String date, Adjustment adjust) throws T2Exception
weeklytime from a string.
date - a non-null stringadjust - a non-null adjustment modeT2Exceptionpublic Week(long year,
int month,
int day,
Adjustment adjust)
throws T2Exception
weeklytime from the given time components.
year - a non-negative numbermonth - a number in [1-12]day - a number between 1 and the last day of the monthadjust - a non-null adjustment modeT2ExceptionCopyright © 2017. All rights reserved.