public class IsoDateTime extends Object
Constructor | Description |
---|---|
IsoDateTime(IsoDate date,
Time time) |
Creates a date-object with the specified date and time.
|
Modifier and Type | Method | Description |
---|---|---|
IsoDate |
date() |
|
boolean |
equals(Object o) |
|
int |
hashCode() |
|
static IsoDateTime |
parse(String input) |
Parses a date and time specification and returns a date-time object.
|
static IsoDateTime |
parseInContext(String input,
IsoDateTime start) |
Parses a date and time specification and returns a date-time object.
|
Time |
time() |
|
String |
toString() |
Returns this date and time in ISO 8601 format: <date>T<time>.
|
TimePoint |
toTimePoint(TimeZone tz) |
Returns a point in time represented by this date-time object.
|
public static IsoDateTime parse(String input)
input
- The input string. May not be null.IllegalArgumentException
- if the date and time cannot be parsed.public static IsoDateTime parseInContext(String input, IsoDateTime start)
The date may omit the larger units, which in such case will be inherited from the start date-time supplied. Note that the start date then must be defined in the same date format as the input string.
input
- The input string. May not be null.start
- IllegalArgumentException
- if the date and time cannot be parsed.public IsoDate date()
public Time time()
public TimePoint toTimePoint(TimeZone tz)
tz
- The timezone.public String toString()
Copyright © 2020 Apptus Technologies AB. All rights reserved.