com.raritantechnologies.utils.time
Class DateTime
java.lang.Object
com.raritantechnologies.utils.time.DateTime
- All Implemented Interfaces:
- IConfigurable
- public class DateTime
- extends java.lang.Object
- implements IConfigurable
Wraps a java.util.Date and precise time: hours minutes seconds.
Developed by
Raritan Technologies .
- Author:
- Ted Sullivan
|
Constructor Summary |
DateTime()
|
DateTime(java.util.Date date)
|
DateTime(int year,
int month,
int date)
|
DateTime(int year,
int month,
int date,
int hour,
int minute)
|
DateTime(int year,
int month,
int date,
int hour,
int minute,
int second)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
HOUR_LEN
public static long HOUR_LEN
DAY_LEN
public static long DAY_LEN
DateTime
public DateTime()
DateTime
public DateTime(java.util.Date date)
DateTime
public DateTime(int year,
int month,
int date)
DateTime
public DateTime(int year,
int month,
int date,
int hour,
int minute)
DateTime
public DateTime(int year,
int month,
int date,
int hour,
int minute,
int second)
initialize
public void initialize(org.w3c.dom.Element elem)
- Description copied from interface:
IConfigurable
- Initializes the object from an XML tag or element.
This method is called by the Framework as part of the application initializtion.
see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory.
Configurable objects that are owned or contained by other configurable objects will be initialized
in by the parent object.
- Specified by:
initialize in interface IConfigurable
getDate
public java.util.Date getDate()
setDate
public void setDate(java.util.Date date)
getTime
public long getTime()
incrementBy
public void incrementBy(int hours,
int minutes,
int seconds)
decrementBy
public void decrementBy(int hours,
int minutes,
int seconds)
after
public boolean after(DateTime another)
before
public boolean before(DateTime another)
equals
public boolean equals(DateTime another)
toString
public java.lang.String toString()
getDays
public int getDays()
getHours
public int getHours()
getMinutes
public int getMinutes()
getSeconds
public int getSeconds()
getCleanDate
public static java.util.Date getCleanDate(java.util.Date date)
daysBetween
public static int daysBetween(DateTime second,
DateTime first)
daysBetween
public static int daysBetween(java.util.Date second,
java.util.Date first)