servicenow.community.soap
Class GlideDateTime
java.lang.Object
servicenow.community.soap.GlideDateTime
- All Implemented Interfaces:
- java.lang.Comparable<GlideDateTime>
public class GlideDateTime
- extends java.lang.Object
- implements java.lang.Comparable<GlideDateTime>
This class holds a Glide DateTime field.
It can convert a Glide DateTime string to a Java Date and vice versa.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
GlideDateTime
public GlideDateTime(java.lang.String value,
java.text.DateFormat format)
throws java.text.ParseException
- Throws:
java.text.ParseException
GlideDateTime
public GlideDateTime(java.lang.String value)
throws java.text.ParseException
- Throws:
java.text.ParseException
GlideDateTime
public GlideDateTime(java.util.Date value)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
toDate
public java.util.Date toDate()
equals
public boolean equals(GlideDateTime another)
compareTo
public int compareTo(GlideDateTime another)
- Specified by:
compareTo
in interface java.lang.Comparable<GlideDateTime>
now
public static GlideDateTime now()
- Get the current time.
- Returns:
- Current datetime.
today
public static GlideDateTime today()
- Get the current GMT date.
- Returns:
- Midnight of the current GMT date.