public class Timestamp extends PrimitiveType<java.lang.String>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ISO8601_FORMAT_MS
ISO 8601 date output format with milliseconds.
|
static java.lang.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(java.lang.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. |
java.lang.String |
toString() |
static Timestamp |
valueOf(java.lang.String value)
Returns a
Timestamp object holding the value of
the specified string, or null if parsing failed. |
equals, getValue
public static final java.lang.String ISO8601_FORMAT_MS
public static final java.lang.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(java.lang.String value) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException
java.lang.IllegalArgumentException
java.lang.UnsupportedOperationException
public Timestamp(org.joda.time.Instant instant)
public Timestamp(org.joda.time.DateTime datetime)
public static Timestamp valueOf(java.lang.String value)
Timestamp
object holding the value of
the specified string, or null if parsing failed.s
- 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 java.lang.String toString()
toString
in class PrimitiveType<java.lang.String>
Copyright © 2014 Open Microscopy Environment