com.claritysys.util
Class Today

java.lang.Object
  extended by com.claritysys.util.Today

public final class Today
extends java.lang.Object

A high performance method for obtaining the current system date as a java.sql.Date with the time value set to zero.

The class caches the date value, updating it once a day as needed. This avoids creating many, many objects just to get the current date.

It is designed for thread-safety.

Version:
$Revision: 2348 $ $Date: 2004-12-01 16:12:21 -0800 (Wed, 01 Dec 2004) $

Nested Class Summary
static class Today.Test
          Some testing.
 
Constructor Summary
Today()
           
 
Method Summary
static java.sql.Date today()
          Return today's date as a java.sql.Date, with the time fields set to zero.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Today

public Today()
Method Detail

today

public static java.sql.Date today()
Return today's date as a java.sql.Date, with the time fields set to zero. This makes the returned Date useful for comparisons to other Date objects.

This method is thread-safe.

Returns:
Today's date as a java.sql.Date.


Copyright ? 2002 Clarity Systems Group, LLC. All Rights Reserved.