spiffy.core.util
Class DateHelper

java.lang.Object
  extended by spiffy.core.util.DateHelper

public class DateHelper
extends Object

Helper methods for creating and manipulating Dates, Calendars etc..

Since:
0.2
Author:
Kasper B. Graversen, (c) 2007

Constructor Summary
DateHelper()
           
 
Method Summary
static Date date(int year, int month, int dayOfMonth)
          An easy and non-depricated non-lenient way of creating Date objects.
static Date date(int year, int month, int dayOfMonth, int hour, int minute, int second)
          An easy and non-depricated non-lenient way of creating Date objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateHelper

public DateHelper()
Method Detail

date

public static Date date(int year,
                        int month,
                        int dayOfMonth)
An easy and non-depricated non-lenient way of creating Date objects.

Parameters:
year - the year, e.g. 2007 is year 2007
month - the month, where 1 == January
dayOfMonth - the day of the month, where 1 == first day of the month
Returns:
a Date object with time set to midnight, ie. hour = 00, minutes = 00, seconds = 00 and milis = 000
Since:
0.02

date

public static Date date(int year,
                        int month,
                        int dayOfMonth,
                        int hour,
                        int minute,
                        int second)
An easy and non-depricated non-lenient way of creating Date objects.

Parameters:
year - the year, e.g. 2007 is year 2007
month - the month, where 1 == January
dayOfMonth - the day of the month, where 1 == first day of the month
hour - the hour in 24 hour format where 0 == midnight
minute - is the minute 0-59
second - is the seconds 0-59
Returns:
a Date object with time set to midnight, ie. hour = 00, minutes = 00, seconds = 00 and milis = 000
Since:
0.02