com.sigh.utils.dates
Class Dates

java.lang.Object
  extended by com.sigh.utils.dates.Dates

public class Dates
extends java.lang.Object

Author:
Software Industry & General Hardware

Constructor Summary
Dates()
           
Dates(java.util.Date theDate)
           
Dates(long timeInMilliseconds)
           
 
Method Summary
static int daysToFirstOfMonth()
           
static int daysToFirstOfMonth(java.util.Calendar aCalendar)
           
static int daysToFirstOfMonth(java.util.Date aDate)
           
static int daysToFirstOfMonth(int aMonth)
           
static int daysToFirstOfMonth(long timeInMilliseconds)
           
static boolean inLeapYear()
          Returns true if this year is a leap year and the month is greater than February or the month is February and the day is greater than 28.
static boolean inLeapYear(java.util.Calendar aCalendar)
          Returns true if this year is a leap year and the month is greater than February or the month is February and the day is greater than 28.
static boolean inLeapYear(java.util.Date aDate)
          Returns true if this year is a leap year and the month is greater than February or the month is February and the day is greater than 28.
static boolean inLeapYear(long timeInMilliseconds)
          Returns true if this year is a leap year and the month is greater than February or the month is February and the day is greater than 28.
 boolean isLeapYear()
          Returns boolean true if the current year can be a leap year otherwise returns boolean false.
 boolean isLeapYear(java.util.Calendar aCalendar)
           
 boolean isLeapYear(java.util.Date aDate)
          Returns true if year represented in aDate is a leap year Returns false if not.
 boolean isLeapYear(int aYear)
          Returns true if the actual parameter supplied can be a leap year.
static int lastDayInMonth(int Month)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dates

public Dates()

Dates

public Dates(java.util.Date theDate)
Parameters:
theDate -

Dates

public Dates(long timeInMilliseconds)
Parameters:
timeInMilliseconds -
Method Detail

lastDayInMonth

public static int lastDayInMonth(int Month)
Parameters:
Month -
Returns:
int

daysToFirstOfMonth

public static int daysToFirstOfMonth()
Returns:
int

daysToFirstOfMonth

public static int daysToFirstOfMonth(int aMonth)
Parameters:
aMonth -
Returns:
int

daysToFirstOfMonth

public static int daysToFirstOfMonth(java.util.Date aDate)
Parameters:
aDate -
Returns:
int

daysToFirstOfMonth

public static int daysToFirstOfMonth(java.util.Calendar aCalendar)
Parameters:
aCalendar -
Returns:
int

daysToFirstOfMonth

public static int daysToFirstOfMonth(long timeInMilliseconds)
Parameters:
timeInMilliseconds -
Returns:
int

isLeapYear

public boolean isLeapYear(java.util.Calendar aCalendar)
Parameters:
aCalendar -
Returns:
boolean

isLeapYear

public boolean isLeapYear()
Returns boolean true if the current year can be a leap year otherwise returns boolean false.

Returns:
boolean

isLeapYear

public boolean isLeapYear(int aYear)
Returns true if the actual parameter supplied can be a leap year. Returns false otherwise.

Parameters:
aYear -
Returns:
boolean

isLeapYear

public boolean isLeapYear(java.util.Date aDate)
Returns true if year represented in aDate is a leap year Returns false if not.

Parameters:
aDate -
Returns:
boolean

inLeapYear

public static boolean inLeapYear()
Returns true if this year is a leap year and the month is greater than February or the month is February and the day is greater than 28.

Returns:
boolean

inLeapYear

public static boolean inLeapYear(java.util.Calendar aCalendar)
Returns true if this year is a leap year and the month is greater than February or the month is February and the day is greater than 28.

Parameters:
aCalendar -
Returns:
boolean

inLeapYear

public static boolean inLeapYear(java.util.Date aDate)
Returns true if this year is a leap year and the month is greater than February or the month is February and the day is greater than 28.

Parameters:
aDate -
Returns:
boolean

inLeapYear

public static boolean inLeapYear(long timeInMilliseconds)
Returns true if this year is a leap year and the month is greater than February or the month is February and the day is greater than 28.

Parameters:
timeInMilliseconds -
Returns:
boolean