public class Timestamp extends PrimitiveType<String>
Modifier and Type | Field and Description |
---|---|
static String |
ISO8601_FORMAT_MS
ISO 8601 date output format with milliseconds.
|
static String |
ISO8601_FORMAT_S
ISO 8601 date output format without milliseconds.
|
static org.joda.time.format.DateTimeFormatter |
ISO8601_FORMATTER_MS
ISO 8601 date output formatter with milliseconds.
|
static org.joda.time.format.DateTimeFormatter |
ISO8601_FORMATTER_S
ISO 8601 date output formatter without milliseconds.
|
static org.joda.time.format.DateTimeFormatter |
ISO8601_PARSER
ISO 8601 date input formatter.
|
Constructor and Description |
---|
Timestamp(org.joda.time.DateTime datetime) |
Timestamp(org.joda.time.Instant instant) |
Timestamp(String value) |
Modifier and Type | Method and Description |
---|---|
org.joda.time.DateTime |
asDateTime(org.joda.time.DateTimeZone zone)
Returns the timestamp as a Joda
DateTime type. |
org.joda.time.Instant |
asInstant()
Returns the timestamp as a Joda
DateTime type. |
String |
toString() |
static Timestamp |
valueOf(String value)
Returns a
Timestamp object holding the value of
the specified string, or null if parsing failed. |
equals, getValue
public static final String ISO8601_FORMAT_MS
public static final String ISO8601_FORMAT_S
public static final org.joda.time.format.DateTimeFormatter ISO8601_PARSER
public static final org.joda.time.format.DateTimeFormatter ISO8601_FORMATTER_MS
public static final org.joda.time.format.DateTimeFormatter ISO8601_FORMATTER_S
public Timestamp(String value) throws IllegalArgumentException, UnsupportedOperationException
public Timestamp(org.joda.time.Instant instant)
public Timestamp(org.joda.time.DateTime datetime)
public static Timestamp valueOf(String value)
Timestamp
object holding the value of
the specified string, or null if parsing failed.value
- The string to be parsed.public org.joda.time.Instant asInstant()
DateTime
type.public org.joda.time.DateTime asDateTime(org.joda.time.DateTimeZone zone)
DateTime
type.zone
- the DateTime instance uses the specified timezone, or the default zone if null.public String toString()
toString
in class PrimitiveType<String>
Copyright © 2006–2024 Open Microscopy Environment. All rights reserved.