public final class DateTime extends Object
| Modifier and Type | Field and Description |
|---|---|
static DateTime |
MIN_VALUE |
static DateTime |
NULL_VALUE |
static boolean |
USE_NANOS
When
true, now() will use nanosecond precision. |
| Constructor and Description |
|---|
DateTime() |
DateTime(Date date) |
DateTime(Instant instant) |
DateTime(long utcTime) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Date |
getJavaDate() |
Instant |
getJavaInstant() |
long |
getJavaTime() |
long |
getUtcTime() |
int |
hashCode() |
boolean |
isNull() |
static DateTime |
now()
Get a
DateTime initialized to now. |
static DateTime |
nowMillis() |
static DateTime |
nowNanos() |
String |
toString() |
public static volatile boolean USE_NANOS
true, now() will use nanosecond precision.public static final DateTime MIN_VALUE
public static final DateTime NULL_VALUE
public DateTime()
public DateTime(long utcTime)
public DateTime(Date date)
public DateTime(Instant instant)
public long getUtcTime()
public long getJavaTime()
public boolean isNull()
public static DateTime nowMillis()
DateTime initialized to now with millisecond precision.Copyright © 2025. All rights reserved.