public class OATime extends OADateTime
OATime is not affected by timezone. A time created on one system will be the same on another machine, even if the timezone is different. See OADateTime for list or formatting symbols.
OADateTime
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
Format1 |
static String |
Format2 |
static String |
Format3 |
static String |
Format4 |
static String |
Format5 |
static String |
Format6 |
protected static String |
timeOutputFormat
default output format
|
_time, format, FORMAT_long, staticOutputFormat, timeZone
Constructor and Description |
---|
OATime()
Create a new time that uses that uses the current Time.
|
OATime(Calendar c)
Create a new time that uses that uses a supplied Calendar.
|
OATime(Date date)
Create a new time that uses that uses a supplied Date.
|
OATime(int hrs,
int mins,
int secs)
Create a new time that uses that uses a supplied hours, minutes, seconds.
|
OATime(int hrs,
int mins,
int secs,
int mili)
Create a new time that uses that uses a supplied hours, minutes, seconds, milliseconds.
|
OATime(long time) |
OATime(OADateTime od)
Create a new time that uses that uses a supplied OADateTime.
|
OATime(String strTime)
Create a new time that uses a supplied String.
|
OATime(String strTime,
String fmt)
Create a new time that uses a supplied String and format.
|
OATime(Time time)
Create a new time that uses that uses a supplied Time.
|
Modifier and Type | Method and Description |
---|---|
static void |
addGlobalParseFormat(String fmt)
Sets the default global parse format used when converting a String to OATime.
|
int |
compare(Object obj)
Time comparision with any object.
|
static String |
getGlobalOutputFormat()
Gets the default global format used when converting OADate to String.
|
static void |
main(String[] args) |
static void |
removeAllGlobalParseFormats()
Removes all global parse formats that are used when converting a String to OATime.
|
static void |
removeGlobalParseFormat(String fmt)
Removes a default global parse format that is used when converting a String to OATime.
|
static void |
setGlobalOutputFormat(String fmt)
Sets the default global format used when converting OADate to String.
|
static OATime |
timeValue(String time)
Converts a String to an OATime using a default format.
|
static OATime |
timeValue(String time,
String fmt)
Converts a String to an OATime using a supplied format.
|
String |
toString()
Converts this time to a String value using default format.
|
String |
toString(String f)
Converts this time to a String value using supplied format.
|
static OADateTime |
valueOf(String time)
Converts a String to an OATime using a default format.
|
static OADateTime |
valueOf(String time,
String fmt)
Converts a String to an OATime.
|
_getCal, _releaseCal, addDay, addDays, addHours, addMilliSeconds, addMinutes, addMonths, addSeconds, addWeeks, addYears, after, before, betweenDays, betweenHours, betweenMilliSeconds, betweenMinutes, betweenMonths, betweenSeconds, betweenYears, clearDate, clearSecondAndMilliSecond, clearTime, compareTo, convert, convertTo, equals, fixDate, get12Hour, get24Hour, getAM_PM, getCalendar, getDate, getDay, getDayOfWeek, getDayOfYear, getDaysInMonth, getFormat, getFormat, getFormat, getFormatter, getHour, getMilliSecond, getMinute, getMonth, getSecond, getTime, getTimeZone, getWeekOfMonth, getWeekOfYear, getYear, hashCode, isAfter, isBefore, set12Hour, set24Hour, setAM_PM, setCalendar, setCalendar, setCalendar, setCalendar, setCalendar, setCalendar, setCalendar, setCalendar, setDate, setDate, setDay, setFormat, setHour, setLocale, setMilliSecond, setMinute, setMonth, setSecond, setTime, setTime, setTime, setTime, setTimeZone, setYear, test, toStringMain, valueOfMain
public static final String Format1
public static final String Format2
public static final String Format3
public static final String Format4
public static final String Format5
public static final String Format6
protected static String timeOutputFormat
public OATime()
Note: clearDate() is called to set date information to 0.
public OATime(Time time)
Note: clearDate() is called to set date information to 0.
public OATime(Date date)
Note: clearDate() is called to set date information to 0.
public OATime(long time)
public OATime(Calendar c)
Note: clearDate() is called to set date information to 0.
public OATime(OADateTime od)
Note: clearDate() is called to set date information to 0.
public OATime(String strTime)
Note: uses default format of "hh:mma" Note: clearDate() is called to set date information to 0.
public OATime(String strTime, String fmt)
Note: clearDate() is called to set date information to 0.
public OATime(int hrs, int mins, int secs)
Note: clearDate() is called to set date information to 0.
hrs
- 0-23valueOf(java.lang.String, java.lang.String)
public OATime(int hrs, int mins, int secs, int mili)
Note: clearDate() is called to set date information to 0.
hrs
- 0-23valueOf(java.lang.String, java.lang.String)
public int compare(Object obj)
compare
in class OADateTime
obj
- Date, OADate, Calendarpublic String toString()
toString
in class OADateTime
OADateTime
public String toString(String f)
toString
in class OADateTime
f
- is format to applyOADateTime
public static OATime timeValue(String time, String fmt)
valueOf(String,String)
,
OADateTime
public static OATime timeValue(String time)
valueOf(String,String)
,
OADateTime
public static OADateTime valueOf(String time, String fmt)
Note: you will need to cast the return value to a OATime.
fmt
- is format to use for parsing. See OADateTime for list of formatting symbols.OADateTime
,
timeValue(String,String)
public static OADateTime valueOf(String time)
Note: you will need to cast the return value to a OATime.
valueOf(String,String)
,
OADateTime
,
timeValue(String,String)
public static void setGlobalOutputFormat(String fmt)
OADateTime.setFormat(java.lang.String)
public static String getGlobalOutputFormat()
OADateTime.setFormat(java.lang.String)
public static void addGlobalParseFormat(String fmt)
OADateTime.setFormat(java.lang.String)
public static void removeGlobalParseFormat(String fmt)
OADateTime.setFormat(java.lang.String)
public static void removeAllGlobalParseFormats()
OADateTime.setFormat(java.lang.String)
public static void main(String[] args)
Copyright © 1999–2019 ViaOA. All rights reserved.