servicenow.community.soap
Class GlideDateTime

java.lang.Object
  extended by 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.


Constructor Summary
GlideDateTime(java.util.Date value)
           
GlideDateTime(java.lang.String value)
           
GlideDateTime(java.lang.String value, java.text.DateFormat format)
           
 
Method Summary
 int compareTo(GlideDateTime another)
           
 boolean equals(GlideDateTime another)
           
static GlideDateTime now()
          Get the current time.
 java.util.Date toDate()
           
static GlideDateTime today()
          Get the current GMT date.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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.