All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class fabula.util.DateCalc

java.lang.Object
   |
   +----fabula.util.DateCalc

public class DateCalc
extends Object
The class DateCalc defines several methods for calculating dates and similar stuff. For example you'll find a method for calculate easter, the week number, begin and end of quarter, etc.


Variable Index

 o APRIL
 o AUGUST
 o DECEMBER
 o FEBRUARY
 o FRIDAY
 o JANUARY
 o JULY
 o JUNE
 o MARCH
 o MAY
 o MONDAY
 o NOVEMBER
 o OCTOBER
 o SATURDAY
 o SEPTEMBER
 o SUNDAY
 o THURSDAY
 o TUESDAY
 o WEDNESDAY

Method Index

 o add(Date, int)
Adds a number of days to a given date
 o BeginOfMonth(Date)
Returns the first day of a month
 o BeginOfQuarter(Date)
returns the begin of a quarter from a date
 o BeginOfWeek(Date, int)
determine the first date in a week
 o BeginOfYear(Date)
Returns the first day of a year (New Year)
 o Day(Date)
Returns the day within the month from a given date
 o DayOfWeek(Date)
Returns the weekday from from a given date
 o DayOfYear(Date)
Returns the number of the day within the year
 o DaysInMonth(Date)
returns the number of days in a month
 o Easter(int)
Returns the easter date for the year values.
 o Encode(int, int, int)
Returns a date from a Delphi like format
 o EndOfMonth(Date)
Returns the last day of a month
 o EndOfQuarter(Date)
returns the end of a quarter from a date
 o EndOfYear(Date)
Returns the last day of a year (Silverster)
 o LeapYear(Date)
Check if date is in a leap year or not
 o Month(Date)
Returns the month from a given date
 o Quicken(Date, char)
calculates a new date with Quicken key schema
 o WeekOfYear(Date)
Calculates the number of the week of a date
 o Year(Date)
Returns the year from a given date

Variables

 o JANUARY
  public final static byte JANUARY
 o FEBRUARY
  public final static byte FEBRUARY
 o MARCH
  public final static byte MARCH
 o APRIL
  public final static byte APRIL
 o MAY
  public final static byte MAY
 o JUNE
  public final static byte JUNE
 o JULY
  public final static byte JULY
 o AUGUST
  public final static byte AUGUST
 o SEPTEMBER
  public final static byte SEPTEMBER
 o OCTOBER
  public final static byte OCTOBER
 o NOVEMBER
  public final static byte NOVEMBER
 o DECEMBER
  public final static byte DECEMBER
 o SUNDAY
  public final static byte SUNDAY
 o MONDAY
  public final static byte MONDAY
 o TUESDAY
  public final static byte TUESDAY
 o WEDNESDAY
  public final static byte WEDNESDAY
 o THURSDAY
  public final static byte THURSDAY
 o FRIDAY
  public final static byte FRIDAY
 o SATURDAY
  public final static byte SATURDAY

Methods

 o Easter
  public static Date Easter(int year)
Returns the easter date for the year values.

Parameters:
year - the year for that easter should be calculated.
Returns:
the easter sunday for the given year
 o Encode
  public static Date Encode(int year,
                            int month,
                            int day)
Returns a date from a Delphi like format

Parameters:
year - the year that should be used
month - the month that should be used
day - the day that should be used
Returns:
the easter sunday for the given year
 o Year
  public static int Year(Date D)
Returns the year from a given date

Parameters:
D - the date that should be used
Returns:
the year for the date
 o Month
  public static int Month(Date D)
Returns the month from a given date

Parameters:
D - the date that should be used
Returns:
the month for the date
 o Day
  public static int Day(Date D)
Returns the day within the month from a given date

Parameters:
D - the date that should be used
Returns:
the day for the date
 o DayOfWeek
  public static int DayOfWeek(Date D)
Returns the weekday from from a given date

Parameters:
D - the date that should be used
Returns:
the weekday for the date
 o BeginOfYear
  public static Date BeginOfYear(Date D)
Returns the first day of a year (New Year)

Parameters:
D - the date that should be used
Returns:
the date of the first day in the year
 o EndOfYear
  public static Date EndOfYear(Date D)
Returns the last day of a year (Silverster)

Parameters:
D - the date that should be used
Returns:
the date of the last day in the year
 o BeginOfMonth
  public static Date BeginOfMonth(Date D)
Returns the first day of a month

Parameters:
D - the date that should be used
Returns:
the date of the first day in the month
 o EndOfMonth
  public static Date EndOfMonth(Date D)
Returns the last day of a month

Parameters:
D - the date that should be used
Returns:
the date of the last day in the month
 o add
  public static Date add(Date D,
                         int aDays)
Adds a number of days to a given date

Parameters:
D - the to which should be added
aDays - the number of days that should be added
Returns:
the new calculated date
 o DayOfYear
  public static int DayOfYear(Date D)
Returns the number of the day within the year

Parameters:
D - the date which should be used
Returns:
the day within the year
 o WeekOfYear
  public static int WeekOfYear(Date D)
Calculates the number of the week of a date

Parameters:
D - the date which should be used
Returns:
the number of the week
 o LeapYear
  public static boolean LeapYear(Date D)
Check if date is in a leap year or not

Parameters:
D - the date which should be used
Returns:
logical value indicated if the date is a leapyear
 o BeginOfQuarter
  public static Date BeginOfQuarter(Date D)
returns the begin of a quarter from a date

Parameters:
D - the date which should be used
Returns:
date with the begin of the quarter
 o EndOfQuarter
  public static Date EndOfQuarter(Date D)
returns the end of a quarter from a date

Parameters:
D - the date which should be used
Returns:
date with the end of the quarter
 o BeginOfWeek
  public static Date BeginOfWeek(Date D,
                                 int Weekday)
determine the first date in a week

Parameters:
D - the date which should be used
Weekday - the weekday which each week starts (SUNDAY or MONDAY)
Returns:
first date of the week
 o DaysInMonth
  public static int DaysInMonth(Date D)
returns the number of days in a month

Parameters:
D - the date which should be used
Returns:
the number of days in the month
 o Quicken
  public static Date Quicken(Date D,
                             char Key)
calculates a new date with Quicken key schema

Parameters:
D - the date which should be used
Key - key that is pressed for date calculating
Returns:
the new calculated date

All Packages  Class Hierarchy  This Package  Previous  Next  Index