public class MultiTime extends Object implements Comparable<MultiTime>
Modifier and Type | Field and Description |
---|---|
static String |
ABBRDFS
1989/01/19 11:45:30.234
|
static String |
AMER
jan 19, 1983 11:45:30.234
|
static String |
AMERDATE
1/19/83 11:45:30.234
|
static String |
BINARY
758979930.234
|
static String |
CLUSTER
19-01-1989 11:45:30.234
|
static String |
DFS
1989-JAN-19 11:45:30.234
|
static String |
DOY
1983 303 11:45:30.234
|
static String |
EURO
19 jan 1983 11:45:30.234
|
static String |
EURODATE
19.1.83 11:45:30.234
|
static String |
HIGHLOW
83 01 19 00 11 45 30.234
|
static String |
ISEEDATE
83 019 JAN 19 11 45 30.234
|
static String |
ISO
19890119T114530.234
|
static String |
JAPANDATE
83.1.19 11:45:30.234
|
Calendar |
mDate
The Date variable where parsed values are stored.
|
TimeZone |
mTimeZone |
static String |
NIPPONDATE
83.19.1 11:45:30.234
|
static String |
PDS
1989-01-19T11:45:30.234 or 1989-019T11:45:30.234 with omissions
|
Constructor and Description |
---|
MultiTime()
Creates an instance of a time value.
|
MultiTime(MultiTime item)
Creates an instance of a time value.
|
Modifier and Type | Method and Description |
---|---|
void |
advance(double minutes)
Advances the time by a specified number of minutes.
|
int |
compareTo(MultiTime anotherTime)
Compare a time to this instance for ordering.
|
boolean |
convert(String pattern,
String buffer)
Parses a string into a Date using the given pattern.
|
void |
copy(MultiTime item)
Makes a copy of a MultiTime item.
|
void |
dawn()
Sets the time to the earliest possible time.
|
void |
eternity()
Sets the time to the latest possible time.
|
static String |
findSpec(String name)
Returns the time format specification that matches the given
standard format name.
|
String |
format(String pattern)
Formats the time in the requested format and returns the string.
|
static void |
main(String[] args)
Execute the class from the command line
|
void |
now()
Sets the date to the current system time.
|
long |
span(MultiTime other)
Returns the number of milliseconds between a time and this time.
|
public static final String AMERDATE
public static final String EURODATE
public static final String AMER
public static final String EURO
public static final String DOY
public static final String JAPANDATE
public static final String NIPPONDATE
public static final String HIGHLOW
public static final String ISEEDATE
public static final String DFS
public static final String ABBRDFS
public static final String PDS
public static final String ISO
public static final String BINARY
public static final String CLUSTER
public TimeZone mTimeZone
public Calendar mDate
public MultiTime()
public MultiTime(MultiTime item)
item
- the instance of a MultiTime value
to initialize this instance with.public static void main(String[] args)
public boolean convert(String pattern, String buffer)
pattern
- the text containing the pattern to parse
buffer with.buffer
- the text containing the string to parse.true
if the string could be parsed.
false
if any error occured.public String format(String pattern)
pattern
- the text containing the pattern to format
the time as.public static String findSpec(String name)
name
- the name of the standard format.public void dawn()
public void eternity()
public int compareTo(MultiTime anotherTime)
compareTo
in interface Comparable<MultiTime>
anotherTime
- the MultiTime to compare to this time.public void copy(MultiTime item)
item
- the instance of the MultiTime item to copy.public void advance(double minutes)
minutes
- the number of minutes to advance the time by.
The value may include a fractional minute.public void now()
public long span(MultiTime other)
other
- the instance of the MultiTime item to compare to.Copyright © 2008-2009 Regents University of California. All Rights Reserved.