Package org.apache.calcite.util
Class DateString
java.lang.Object
org.apache.calcite.util.DateString
- All Implemented Interfaces:
- Comparable<DateString>
Date literal.
 
Immutable, internally represented as a string (in ISO format).
- 
Constructor SummaryConstructorsConstructorDescriptionDateString(int year, int month, int day) Creates a DateString for year, month, day values.DateString(String v) Creates a DateString.
- 
Method SummaryModifier and TypeMethodDescriptionintbooleanstatic DateStringfromCalendarFields(Calendar calendar) Creates a DateString from a Calendar.static DateStringfromDaysSinceEpoch(int days) Creates a DateString that is a given number of days since the epoch.intReturns the number of days since the epoch.longReturns the number of milliseconds since the epoch.inthashCode()toString()
- 
Constructor Details- 
DateStringCreates a DateString.
- 
DateStringpublic DateString(int year, int month, int day) Creates a DateString for year, month, day values.
 
- 
- 
Method Details- 
toString
- 
equals
- 
hashCodepublic int hashCode()
- 
compareTo- Specified by:
- compareToin interface- Comparable<DateString>
 
- 
fromCalendarFieldsCreates a DateString from a Calendar.
- 
getDaysSinceEpochpublic int getDaysSinceEpoch()Returns the number of days since the epoch.
- 
fromDaysSinceEpochCreates a DateString that is a given number of days since the epoch.
- 
getMillisSinceEpochpublic long getMillisSinceEpoch()Returns the number of milliseconds since the epoch. Always a multiple of 86,400,000 (the number of milliseconds in a day).
- 
toCalendar
 
-