Package org.oorexx.datergf
Interface DTC
public interface DTC
This interface serves as a container for constants used in the classes of
the datergf package in order to minimize the needed space of compiled classes.
It also allows for referring to these constants in a much shorter way by using
the string "DTC": "Date/Time
Constants".
This file contains final primitive datatype values (constants) only!
Examples:
DateRGF d=new DateRGF().update();
int day=d.get(DTC.DAY_FIELD); // retrieves the day field
------------------------ Apache Version 2.0 license -------------------------
Copyright (C) 2001-2006 Rony G. Flatscher
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-----------------------------------------------------------------------------
Temporary dev-infos:
version date remark
0.9.2 2001-04-05 - created this interface
2005-12-28 - added Apache license 2.0, put sources with BSF4Rexx
- Version:
- 0.92, date: 2001-02-08 through 2001-04-02, 2006-01-01
- Author:
- Rony G. Flatscher
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intApril, has value 4 (ISO).static final intAugust, has value 8 (ISO).static final intConstant to refer to theDateRGF.dayfield inDateRGF.get(int flag)andDateRGF.set(int flag, int new_value).static final intConstant to refer to theDateRGF.dateOrderfield inDateRGF.getStatic(int flag)andDateRGF.setStatic(int flag, int new_value).static final intConstant to refer to theDateRGF.dayfield inDateRGF.get(int flag)andDateRGF.set(int flag, int new_value).static final intConstant 'total of days in month'.static final intDecember, has value 12 (ISO).static final byteConstant to indicate the order Day/Month/Year.static final intConstant 'day name'.static final intConstant 'day of week' (DOW).static final intConstant 'day of week relative to day which begins the week (DateRGF.weekStart.static final intstatic final intConstant to indicate that the time is encoded as an integer representing the time as milliseconds relative to midnight.static final intConstant to indicate that the time is encoded as an integer representing the time as seconds relative to midnight.static final intConstant, to indicate to use the default epoch.static final intConstant, epoch starts with 1980-01-01.static final intConstant, epoch starts with 1970-01-01.static final intConstant, epoch starts with 1904-01-01.static final intConstant, epoch starts with 1858-11-17 and denotes the epoch of the "modified julian day (MJD)" sometimes used in calendar algorithms.static final intConstant, epoch starts with 1904-01-01.static final intConstant, epoch defined by the user (DateRGF.setDefaultEpochDate(int value).static final intConstant, epoch starts with 1601-01-01.static final intFebruary, has value (ISO).static final intFriday, has value 5 (ISO).static final intConstant to indicate the usage of the Gregorian calendar in the methodsDateRGF.jdn2date(int jdn, DateRGF aDate, int flag)andDateRGF.date2jdn(int year, int month, int day, int flag).static final intConstant to refer to theTimeRGF.hourfield inTimeRGF.get(int flag)andTimeRGF.set(int flag, int new_value).static final intConstant 'half year' (semester).static final intConstant 'half year begin' (semester begin).static final intConstant 'half year end' (semester end).static final intJanuary, has value 1 (ISO).static final intConstant to refer to theDateRGF.jdnfield inDateRGF.get(int flag)andDateRGF.set(int flag, int new_value).static final intConstant to indicate the usage of the Julian calendar in the methodsDateRGF.jdn2date(int jdn, DateRGF aDate, int flag)andDateRGF.date2jdn(int year, int month, int day, int flag), or to indicate that a 'Julian date' (in the form 'YYYYddd') is desired in the methodDateRGF.get(int flag).static final intJuly, has value 7 (ISO).static final intJune, has value 6 (ISO).static final intConstant to refer to theDateRGF.monthfield inDateRGF.get(int flag)andDateRGF.set(int flag, int new_value).static final intMarch, has value 3 (ISO).static final intMay, has value 5 (ISO).static final intConstant 'month begin'.static final byteConstant to indicate the order Month/Day/Year.static final intConstant 'month end'.static final intConstant to refer to theTimeRGF.millisfield inTimeRGF.get(int flag)andTimeRGF.set(int flag, int new_value).static final intMillis in a full day (86.400.000).static final intMillis in a full hour (3.600.000).static final intMillis in a full minute (60.000).static final intMillis in a full second (1.000).static final intConstant to refer to theTimeRGF.minutefield inTimeRGF.get(int flag)andTimeRGF.set(int flag, int new_value).static final intConstant 'month name'.static final intMonday, has value 1 (ISO).static final intFlag to refer to theDateRGF.monthfield inDateRGF.get(int flag)andDateRGF.set(int flag, int new_value).static final intConstant to indicate an impossible value forDateRGF.jdn, "Not A Date"static final intNovember, has value 11 (ISO).static final intOctober, has value 10 (ISO).static final intConstant 'quarter'.static final intConstant 'quarter begin'.static final intConstant 'quarter end'.static final intConstant to refer to theTimeRGF.raw_millisfield inTimeRGF.get(int flag)andTimeRGF.set(int flag, int new_value).static final intSaturday, has value 6 (ISO).static final intConstant to refer to theTimeRGF.secondfield inTimeRGF.get(int flag)andTimeRGF.set(int flag, int new_value).static final intSeconds in a full day (86400).static final intSeconds in a full hour (3600).static final intSeconds in a full minute (60).static final intSeptember, has value 9 (ISO).static final intSunday, has value 7 (ISO).static final intThursday, has value 4 (ISO).static final intTuesday, has value 2 (ISO).static final StringVersion string indicating version of this class (majorVersion*100+minorVersion concatenated with a dot and the sorted date of last change.static final intConstant 'ISO week number'.static final intConstant 'week begin'.static final intConstant 'week end'.static final intWednesday, has value 3 (ISO).static final intConstant 'ISO week number'.static final intConstant to refer toDateRGF.weekStart.static final intConstant 'weekday' inidicating that the date is to be set to one of the given weekdays using theDateRGF.set(int flag, int number)method.static final intConstant to refer to theDateRGF.yearfield inDateRGF.get(int flag)andDateRGF.set(int flag, int new_value).static final intConstant 'year begin'.static final intConstant 'year end'.static final intConstant to refer to theDateRGF.yearfield inDateRGF.get(int flag)andDateRGF.set(int flag, int new_value).static final byteConstant to indicate the order Year/Month/Day.
-
Field Details
-
version
Version string indicating version of this class (majorVersion*100+minorVersion concatenated with a dot and the sorted date of last change.- See Also:
-
SECONDS_PER_DAY
static final int SECONDS_PER_DAYSeconds in a full day (86400).- See Also:
-
SECONDS_PER_HOUR
static final int SECONDS_PER_HOURSeconds in a full hour (3600).- See Also:
-
SECONDS_PER_MINUTE
static final int SECONDS_PER_MINUTESeconds in a full minute (60).- See Also:
-
MILLIS_PER_DAY
static final int MILLIS_PER_DAYMillis in a full day (86.400.000).- See Also:
-
MILLIS_PER_HOUR
static final int MILLIS_PER_HOURMillis in a full hour (3.600.000).- See Also:
-
MILLIS_PER_MINUTE
static final int MILLIS_PER_MINUTEMillis in a full minute (60.000).- See Also:
-
MILLIS_PER_SECOND
static final int MILLIS_PER_SECONDMillis in a full second (1.000).- See Also:
-
HOUR_FIELD
static final int HOUR_FIELDConstant to refer to theTimeRGF.hourfield inTimeRGF.get(int flag)andTimeRGF.set(int flag, int new_value).- See Also:
-
MINUTE_FIELD
static final int MINUTE_FIELDConstant to refer to theTimeRGF.minutefield inTimeRGF.get(int flag)andTimeRGF.set(int flag, int new_value).- See Also:
-
SECOND_FIELD
static final int SECOND_FIELDConstant to refer to theTimeRGF.secondfield inTimeRGF.get(int flag)andTimeRGF.set(int flag, int new_value).- See Also:
-
MILLIS_FIELD
static final int MILLIS_FIELDConstant to refer to theTimeRGF.millisfield inTimeRGF.get(int flag)andTimeRGF.set(int flag, int new_value).- See Also:
-
RAW_MILLIS_FIELD
static final int RAW_MILLIS_FIELDConstant to refer to theTimeRGF.raw_millisfield inTimeRGF.get(int flag)andTimeRGF.set(int flag, int new_value).- See Also:
-
ENCODED_AS_INTEGER
static final int ENCODED_AS_INTEGERConstant to indicate that DateRGF is encoded as an integer in the form of:.year*10000+month*100+dayOr:<P Constant to indicate that TimeRGF is encoded as an integer in the form of:
.TimeRGF.hour*10000+TimeRGF.minute*100+TimeRGF.second- See Also:
-
ENCODED_AS_SECONDS
static final int ENCODED_AS_SECONDSConstant to indicate that the time is encoded as an integer representing the time as seconds relative to midnight.- See Also:
-
ENCODED_AS_MILLIS
static final int ENCODED_AS_MILLISConstant to indicate that the time is encoded as an integer representing the time as milliseconds relative to midnight.- See Also:
-
MONDAY
static final int MONDAYMonday, has value 1 (ISO).- See Also:
-
TUESDAY
static final int TUESDAYTuesday, has value 2 (ISO).- See Also:
-
WEDNESDAY
static final int WEDNESDAYWednesday, has value 3 (ISO).- See Also:
-
THURSDAY
static final int THURSDAYThursday, has value 4 (ISO).- See Also:
-
FRIDAY
static final int FRIDAYFriday, has value 5 (ISO).- See Also:
-
SATURDAY
static final int SATURDAYSaturday, has value 6 (ISO).- See Also:
-
SUNDAY
static final int SUNDAYSunday, has value 7 (ISO).- See Also:
-
JANUARY
static final int JANUARYJanuary, has value 1 (ISO).- See Also:
-
FEBRUARY
static final int FEBRUARYFebruary, has value (ISO).- See Also:
-
MARCH
static final int MARCHMarch, has value 3 (ISO).- See Also:
-
APRIL
static final int APRILApril, has value 4 (ISO).- See Also:
-
MAY
static final int MAYMay, has value 5 (ISO).- See Also:
-
JUNE
static final int JUNEJune, has value 6 (ISO).- See Also:
-
JULY
static final int JULYJuly, has value 7 (ISO).- See Also:
-
AUGUST
static final int AUGUSTAugust, has value 8 (ISO).- See Also:
-
SEPTEMBER
static final int SEPTEMBERSeptember, has value 9 (ISO).- See Also:
-
OCTOBER
static final int OCTOBEROctober, has value 10 (ISO).- See Also:
-
NOVEMBER
static final int NOVEMBERNovember, has value 11 (ISO).- See Also:
-
DECEMBER
static final int DECEMBERDecember, has value 12 (ISO).- See Also:
-
YMD
static final byte YMDConstant to indicate the order Year/Month/Day.- See Also:
-
MDY
static final byte MDYConstant to indicate the order Month/Day/Year.- See Also:
-
DMY
static final byte DMYConstant to indicate the order Day/Month/Year.- See Also:
-
DATE_ORDER
static final int DATE_ORDERConstant to refer to theDateRGF.dateOrderfield inDateRGF.getStatic(int flag)andDateRGF.setStatic(int flag, int new_value).- See Also:
-
YEAR_FIELD
static final int YEAR_FIELDConstant to refer to theDateRGF.yearfield inDateRGF.get(int flag)andDateRGF.set(int flag, int new_value).- See Also:
-
Y
static final int YConstant to refer to theDateRGF.yearfield inDateRGF.get(int flag)andDateRGF.set(int flag, int new_value). This is an alias forYEAR_FIELD.- See Also:
-
MONTH_FIELD
static final int MONTH_FIELDFlag to refer to theDateRGF.monthfield inDateRGF.get(int flag)andDateRGF.set(int flag, int new_value).- See Also:
-
M
static final int MConstant to refer to theDateRGF.monthfield inDateRGF.get(int flag)andDateRGF.set(int flag, int new_value). This is an alias forMONTH_FIELD.- See Also:
-
DAY_FIELD
static final int DAY_FIELDConstant to refer to theDateRGF.dayfield inDateRGF.get(int flag)andDateRGF.set(int flag, int new_value).- See Also:
-
D
static final int DConstant to refer to theDateRGF.dayfield inDateRGF.get(int flag)andDateRGF.set(int flag, int new_value). This is an alias forDAY_FIELD.- See Also:
-
JDN
static final int JDNConstant to refer to theDateRGF.jdnfield inDateRGF.get(int flag)andDateRGF.set(int flag, int new_value)."JDN" stands for "Julian day number" and is a unique value assigned to each day of a Julian or Gregorian date.
- See Also:
-
EPOCH_MJD
static final int EPOCH_MJDConstant, epoch starts with 1858-11-17 and denotes the epoch of the "modified julian day (MJD)" sometimes used in calendar algorithms. To get a DateRGF object of it usevalueOf(DTC.EPOCH_MJD, 0).- See Also:
-
EPOCH_MACINTOSH
static final int EPOCH_MACINTOSHConstant, epoch starts with 1904-01-01. To get a DateRGF object of it usevalueOf(DTC.EPOCH_MACINTOSH, 0).- See Also:
-
EPOCH_PALM
static final int EPOCH_PALMConstant, epoch starts with 1904-01-01. Same asEPOCH_MACINTOSH. To get a DateRGF object of it usevalueOf(DTC.EPOCH_PALM, 0).- See Also:
-
EPOCH_JAVA
static final int EPOCH_JAVAConstant, epoch starts with 1970-01-01. To get a DateRGF object of it usevalueOf(DTC.EPOCH_JAVA, 0).- See Also:
-
EPOCH_DOS
static final int EPOCH_DOSConstant, epoch starts with 1980-01-01. To get a DateRGF object of it usevalueOf(DTC.EPOCH_DOS, 0).- See Also:
-
EPOCH_WIN32
static final int EPOCH_WIN32Constant, epoch starts with 1601-01-01. To get a DateRGF object of it usevalueOf(DTC.EPOCH_WIN32, 0).- See Also:
-
EPOCH_USER
static final int EPOCH_USERConstant, epoch defined by the user (DateRGF.setDefaultEpochDate(int value).- See Also:
-
EPOCH_DEFAULT
static final int EPOCH_DEFAULTConstant, to indicate to use the default epoch. To get a DateRGF object of it usevalueOf(#valueOf(int flag, int daysToAdd) valueOf(DTC.EPOCH_DEFAULT, 0).- See Also:
-
DN
static final int DNConstant 'day name'.- See Also:
-
DOW
static final int DOWConstant 'day of week' (DOW). Values 1 (Monday) through 7 (Sunday).- See Also:
-
DOW_ORDINAL
static final int DOW_ORDINALConstant 'day of week relative to day which begins the week (DateRGF.weekStart. If week starts with Sundays, then a Sunday is 1 ('first day of the week'), Monday is 2 ('second day of the week') through Saturday, which is 7 ('seventh day of the week').- See Also:
-
WEEK
static final int WEEKConstant 'ISO week number'. The first ISO week of a year is the one which contains the first Thursday of January. Therefore there may be years with 53 (!) weeks, e.g. 20041231 through 20050102.- See Also:
-
W
static final int WConstant 'ISO week number'. This is an alias forWEEK.- See Also:
-
WB
static final int WBConstant 'week begin'. This will start with the day given inDateRGF.weekStart.- See Also:
-
WE
static final int WEConstant 'week end'. This is relative toDateRGF.weekStart.- See Also:
-
WEEKDAY
static final int WEEKDAYConstant 'weekday' inidicating that the date is to be set to one of the given weekdays using theDateRGF.set(int flag, int number)method.- See Also:
-
MB
static final int MBConstant 'month begin'.- See Also:
-
ME
static final int MEConstant 'month end'.- See Also:
-
MN
static final int MNConstant 'month name'.- See Also:
-
DAYS_IN_MONTH
static final int DAYS_IN_MONTHConstant 'total of days in month'.- See Also:
-
Q
static final int QConstant 'quarter'.- See Also:
-
QB
static final int QBConstant 'quarter begin'.- See Also:
-
QE
static final int QEConstant 'quarter end'.- See Also:
-
HY
static final int HYConstant 'half year' (semester).- See Also:
-
HYB
static final int HYBConstant 'half year begin' (semester begin).- See Also:
-
HYE
static final int HYEConstant 'half year end' (semester end).- See Also:
-
YB
static final int YBConstant 'year begin'.- See Also:
-
YE
static final int YEConstant 'year end'.- See Also:
-
GREGORIAN
static final int GREGORIANConstant to indicate the usage of the Gregorian calendar in the methodsDateRGF.jdn2date(int jdn, DateRGF aDate, int flag)andDateRGF.date2jdn(int year, int month, int day, int flag).- See Also:
-
JULIAN
static final int JULIANConstant to indicate the usage of the Julian calendar in the methodsDateRGF.jdn2date(int jdn, DateRGF aDate, int flag)andDateRGF.date2jdn(int year, int month, int day, int flag), or to indicate that a 'Julian date' (in the form 'YYYYddd') is desired in the methodDateRGF.get(int flag).- See Also:
-
NAD
static final int NADConstant to indicate an impossible value forDateRGF.jdn, "Not A Date"- See Also:
-
WEEK_START
static final int WEEK_STARTConstant to refer toDateRGF.weekStart.- See Also:
-