public class BrokerDate
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
day |
int |
hour |
boolean |
is_date_and_time
true if both date and time are represented.
|
boolean |
is_utc
true if the date and time are stored as UTC.
|
int |
min |
int |
month |
int |
msec |
protected static java.util.ResourceBundle |
rb |
int |
sec |
int |
year |
Constructor and Description |
---|
BrokerDate()
Create an empty date.
|
BrokerDate(BrokerDate date)
Copy constructor.
|
BrokerDate(java.util.Calendar calendar)
Create using a Java Calendar.
|
BrokerDate(java.util.Calendar calendar,
boolean normalize_time)
Create using a Java Calendar.
|
BrokerDate(java.util.Date date)
Create using a Java Date.
|
BrokerDate(java.util.Date date,
boolean normalize_time)
Create using a Java Date.
|
BrokerDate(int yr,
int mo,
int dy)
Create with the date set.
|
BrokerDate(int yr,
int mo,
int dy,
int hr,
int m,
int s,
int ms)
Create with the date and time set.
|
BrokerDate(int yr,
int mo,
int dy,
int hr,
int m,
int s,
int ms,
boolean normalize_time)
Create with the date and time set.
|
BrokerDate(java.lang.String date_string)
Create from date string using the a date or date/time formatter for the US English locale.
|
BrokerDate(java.lang.String date_string,
boolean normalize_time)
Create from date string using the a date or date/time formatter for the US English locale.
|
BrokerDate(java.lang.String date_string,
java.util.Locale locale)
Create from date string using a date/time formatter for the specified locale.
|
BrokerDate(java.lang.String date_string,
java.util.Locale locale,
boolean normalize_time)
Create from date string using a date/time formatter for the specified locale.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the date entirely.
|
void |
clearTime()
Clear the time but leave the date intact.
|
int |
compareTo(BrokerDate d)
Compares to the given date.
|
boolean |
equals(BrokerDate d)
True if the date is equal to this one.
|
java.util.Calendar |
getJavaCalendar()
Get the date as a Java Calendar object.
|
java.util.Date |
getJavaDate()
Get the date as a Java Date object.
|
boolean |
isNull() |
static java.lang.String |
msg(java.lang.String key,
java.lang.String arg1) |
static BrokerDate |
parseDate(java.lang.String date_string)
Create a BrokerDate from a date string using a date or date/time formatter for the US English locale.
|
static BrokerDate |
parseDate(java.lang.String date_string,
boolean normalize_time)
Create a BrokerDate from a date string using a date or date/time formatter for the US English locale.
|
static BrokerDate |
parseDate(java.lang.String date_string,
java.util.Locale locale)
Create a BrokerDate from a date string using a date or date/time formatter for the specified locale.
|
static BrokerDate |
parseDate(java.lang.String date_string,
java.util.Locale locale,
boolean normalize_time)
Create a BrokerDate from a date string using a date or date/time formatter for the specified locale.
|
static BrokerDate |
parseLocalizedDate(java.lang.String date_string)
Create a BrokerDate from a date string using a date or date/time formatter for the default locale.
|
static BrokerDate |
parseLocalizedDate(java.lang.String date_string,
boolean normalize_time)
Create a BrokerDate from a date string using a date or date/time formatter for the default locale.
|
void |
setDate(int yr,
int mo,
int dy)
Set the date only.
|
void |
setDateTime(int yr,
int mo,
int dy,
int hr,
int m,
int s,
int ms)
Set the date and time.
|
void |
setDateTime(int yr,
int mo,
int dy,
int hr,
int m,
int s,
int ms,
boolean normalize_time)
Set the date and time.
|
void |
setJavaCalendar(java.util.Calendar calendar)
Set from a Java Calendar object.
|
void |
setJavaDate(java.util.Date date)
Set from a Java Date object.
|
void |
setJavaDate(java.util.Date date,
boolean normalize_time)
Set from a Java Date object.
|
void |
setTime(int hr,
int m,
int s,
int ms)
Set the time only.
|
void |
setTime(int hr,
int m,
int s,
int ms,
boolean normalize_time)
Set the time only.
|
java.lang.String |
toLocalizedString()
Return in a string format.
|
java.lang.String |
toString()
Return in a string format.
|
java.lang.String |
toString(java.util.Locale locale)
Return in a string format.
|
protected static final java.util.ResourceBundle rb
public int year
public int month
public int day
public int hour
public int min
public int sec
public int msec
public boolean is_date_and_time
public boolean is_utc
public BrokerDate()
public BrokerDate(int yr, int mo, int dy)
public BrokerDate(int yr, int mo, int dy, int hr, int m, int s, int ms)
public BrokerDate(int yr, int mo, int dy, int hr, int m, int s, int ms, boolean normalize_time)
public BrokerDate(java.util.Calendar calendar)
public BrokerDate(java.util.Calendar calendar, boolean normalize_time)
public BrokerDate(java.util.Date date)
public BrokerDate(java.util.Date date, boolean normalize_time)
public BrokerDate(BrokerDate date)
public BrokerDate(java.lang.String date_string) throws java.text.ParseException
java.text.ParseException
- If there is an error in the date string.public BrokerDate(java.lang.String date_string, boolean normalize_time) throws java.text.ParseException
java.text.ParseException
- If there is an error in the date string.public BrokerDate(java.lang.String date_string, java.util.Locale locale) throws java.text.ParseException
java.text.ParseException
- If there is an error in the date string.public BrokerDate(java.lang.String date_string, java.util.Locale locale, boolean normalize_time) throws java.text.ParseException
java.text.ParseException
- If there is an error in the date string.public static BrokerDate parseDate(java.lang.String date_string)
java.lang.IllegalArgumentException
- If there is an error in the date string.public static BrokerDate parseDate(java.lang.String date_string, boolean normalize_time)
java.lang.IllegalArgumentException
- If there is an error in the date string.public static BrokerDate parseDate(java.lang.String date_string, java.util.Locale locale)
java.lang.IllegalArgumentException
- If there is an error in the date string.public static BrokerDate parseDate(java.lang.String date_string, java.util.Locale locale, boolean normalize_time)
java.lang.IllegalArgumentException
- If there is an error in the date string.public static BrokerDate parseLocalizedDate(java.lang.String date_string)
java.lang.IllegalArgumentException
- If there is an error in the date string.public static BrokerDate parseLocalizedDate(java.lang.String date_string, boolean normalize_time)
java.lang.IllegalArgumentException
- If there is an error in the date string.public java.util.Calendar getJavaCalendar() throws BrokerException
BrokerOutOfRangeException
- If the date in this object cannot be represetned in a Java Calendar.BrokerException
public java.util.Date getJavaDate() throws BrokerException
BrokerOutOfRangeException
- If the date in this object cannot be represented in a Java Date.BrokerException
public void setDateTime(int yr, int mo, int dy, int hr, int m, int s, int ms)
public void setDateTime(int yr, int mo, int dy, int hr, int m, int s, int ms, boolean normalize_time)
public void setDate(int yr, int mo, int dy)
public void setTime(int hr, int m, int s, int ms)
public void setTime(int hr, int m, int s, int ms, boolean normalize_time) throws BrokerException
BrokerException
public void setJavaCalendar(java.util.Calendar calendar)
public void setJavaDate(java.util.Date date)
public void setJavaDate(java.util.Date date, boolean normalize_time)
public void clear()
public void clearTime()
public boolean equals(BrokerDate d)
public int compareTo(BrokerDate d)
public java.lang.String toString(java.util.Locale locale)
public java.lang.String toString()
toString(java.util.Locale.US)
toString
in class java.lang.Object
public java.lang.String toLocalizedString()
toString(java.util.Locale.getDefault())
.public static java.lang.String msg(java.lang.String key, java.lang.String arg1)
public boolean isNull()
Copyright © 2002-2006 webMethods, Inc. Copyright © 2007-2021 Software AG Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.