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.
-
APRIL
-
-
AUGUST
-
-
DECEMBER
-
-
FEBRUARY
-
-
FRIDAY
-
-
JANUARY
-
-
JULY
-
-
JUNE
-
-
MARCH
-
-
MAY
-
-
MONDAY
-
-
NOVEMBER
-
-
OCTOBER
-
-
SATURDAY
-
-
SEPTEMBER
-
-
SUNDAY
-
-
THURSDAY
-
-
TUESDAY
-
-
WEDNESDAY
-
-
add(Date, int)
- Adds a number of days to a given date
-
BeginOfMonth(Date)
- Returns the first day of a month
-
BeginOfQuarter(Date)
- returns the begin of a quarter from a date
-
BeginOfWeek(Date, int)
- determine the first date in a week
-
BeginOfYear(Date)
- Returns the first day of a year (New Year)
-
Day(Date)
- Returns the day within the month from a given date
-
DayOfWeek(Date)
- Returns the weekday from from a given date
-
DayOfYear(Date)
- Returns the number of the day within the year
-
DaysInMonth(Date)
- returns the number of days in a month
-
Easter(int)
- Returns the easter date for the
year
values.
-
Encode(int, int, int)
- Returns a date from a Delphi like format
-
EndOfMonth(Date)
- Returns the last day of a month
-
EndOfQuarter(Date)
- returns the end of a quarter from a date
-
EndOfYear(Date)
- Returns the last day of a year (Silverster)
-
LeapYear(Date)
- Check if date is in a leap year or not
-
Month(Date)
- Returns the month from a given date
-
Quicken(Date, char)
- calculates a new date with Quicken key schema
-
WeekOfYear(Date)
- Calculates the number of the week of a date
-
Year(Date)
- Returns the year from a given date
JANUARY
public final static byte JANUARY
FEBRUARY
public final static byte FEBRUARY
MARCH
public final static byte MARCH
APRIL
public final static byte APRIL
MAY
public final static byte MAY
JUNE
public final static byte JUNE
JULY
public final static byte JULY
AUGUST
public final static byte AUGUST
SEPTEMBER
public final static byte SEPTEMBER
OCTOBER
public final static byte OCTOBER
NOVEMBER
public final static byte NOVEMBER
DECEMBER
public final static byte DECEMBER
SUNDAY
public final static byte SUNDAY
MONDAY
public final static byte MONDAY
TUESDAY
public final static byte TUESDAY
WEDNESDAY
public final static byte WEDNESDAY
THURSDAY
public final static byte THURSDAY
FRIDAY
public final static byte FRIDAY
SATURDAY
public final static byte SATURDAY
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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