Class DatetimeHelper
java.lang.Object
org.apache.tinkerpop.gremlin.util.DatetimeHelper
Utility class for parsing and formatting dates/times.
-
Method Summary
Modifier and TypeMethodDescriptionstatic OffsetDateTimedatetime()A proxy allows for syntax similar to Gremlin grammar ofdatetime().static OffsetDateTimeA proxy call toparse(String)but allows for syntax similar to Gremlin grammar ofdatetime().static StringFormats anInstantto a form of2018-03-22T00:35:44Zat UTC.static OffsetDateTimeParses aStringrepresenting a date and/or time to aDateobject with a default time zone offset of UTC (+00:00).
-
Method Details
-
format
Formats anInstantto a form of2018-03-22T00:35:44Zat UTC. -
parse
Parses aStringrepresenting a date and/or time to aDateobject with a default time zone offset of UTC (+00:00). It can parse dates in any of the following formats.- 2018-03-22
- 2018-03-22T00:35:44
- 2018-03-22T00:35:44Z
- 2018-03-22T00:35:44.741
- 2018-03-22T00:35:44.741Z
- 2018-03-22T00:35:44.741+1600
- 2018-03-22T00:35:44.741+16:00
- 2018-03-22T00:35:44.741+160000
- 2018-03-22T00:35:44.741+16:00:00
-
datetime
A proxy call toparse(String)but allows for syntax similar to Gremlin grammar ofdatetime(). -
datetime
A proxy allows for syntax similar to Gremlin grammar ofdatetime().
-