A class for manipulating dates.
wxDate add-months
wxDate add-weeks
wxDate add-years
wxDate create
wxDate create-julian
wxDate create-string
wxDate format
wxDate get-day
wxDate get-day-of-week
wxDate get-day-of-week-name
wxDate get-day-of-year
wxDate get-days-in-month
wxDate get-first-day-of-month
wxDate get-julian-date
wxDate get-month
wxDate get-month-end
wxDate get-month-name
wxDate get-month-start
wxDate get-week-of-month
wxDate get-week-of-year
wxDate get-year
wxDate get-year-end
wxDate get-year-start
wxDate is-leap-year
wxDate set
wxDate set-julian
wxDate set-date
wxDate set-format
wxDate set-option
wxDate add-days
wxDate subtract-days
wxDate subtract
wxDate add-self
wxDate subtract-self
wxDate le
wxDate leq
wxDate ge
wxDate geq
wxDate eq
wxDate neq
bool ( add-months long months)
Adds the given number of months to the date, returning TRUE if successful.
bool ( add-weeks long weeks)
Adds the given number of weeks to the date, returning TRUE if successful.
bool ( add-years long years)
Adds the given number of months to the date, returning TRUE if successful.
void ( create)
Constructs a date object, initialized to zero. You are responsible for deleting this object when you have finished with it.
void ( create long month long day long year)
Constructs a date object with the specified date. You are responsible for deleting this object when you have finished with it.
month is a number from 1 to 12.
day is a number from 1 to 31.
year is a year, such as 1995, 2005.
bool ( create-julian long julian)
Constructor taking an integer representing the Julian date.
bool ( wxDate create-string string date)
Constructor taking a string representing a date. This must be either the string TODAY, or of the form MM/DD/YYYY or MM-DD-YYYY. For example:
(make-instance (gensym*) (date-string "11/26/1966"))
string ( format)
Formats the date into a string according to the current display type.
long ( get-day)
Returns the numeric day (in the range 1 to 365).
long ( get-day-of-week)
Returns the integer day of the week (in the range 1 to 7).
string ( day-of-week-name)
Returns the name of the day of week.
long ( get-day-of-year)
Returns the day of the year (from 1 to 365).
long ( get-days-in-month)
Returns the number of days in the month (in the range 1 to 31).
long ( get-first-day-of-month)
Returns the day of week that is first in the month (in the range 1 to 7).
long ( get-julian-date)
Returns the Julian date.
long ( get-month)
Returns the month number (in the range 1 to 12).
long ( get-month-end)
Returns a new date representing the day that is last in the month. The new date must be deleted when it is finished with.
string ( get-month-name)
Returns the name of the month.
wxDate ( get-month-start)
Returns a new date representing the first day of the month. The new date must be deleted when it is finished with.
long ( get-week-of-month)
Returns the week of month (in the range 1 to 6).
long ( get-week-of-year)
Returns the week of year (in the range 1 to 52).
long ( get-year)
Returns the year as an integer (such as '1995').
wxDate ( get-year-end)
Returns a new date the date representing the last day of the year. Delete the new date when you have finished with it.
wxDate ( get-year-start)
Returns a new date the date representing the first day of the year. Delete the new date when you have finished with it.
bool ( is-leap-year)
Returns TRUE if the year of this date is a leap year.
bool ( set)
Sets the date to current system date.
bool ( set-julian long julian)
Sets the date to the given Julian date.
bool ( set-date long month long day long year)
Sets the date to the given date.
month is a number from 1 to 12.
day is a number from 1 to 31.
year is a year, such as 1995, 2005.
bool ( set-format string format)
Sets the current format type.
format should be one of:
wxDAY | Format day only. |
wxMONTH | Format month only. |
wxMDY | Format MONTH, DAY, YEAR. |
wxFULL | Format day, month and year in US style: DAYOFWEEK, MONTH, DAY, YEAR. |
wxEUROPEAN | Format day, month and year in European style: DAY, MONTH, YEAR. |
bool ( set-option string option long enable=1)
Enables or disables an option for formatting. option may be one of:
wxNO_CENTURY | The century is not formatted. |
wxDATE_ABBR | Month and day names are abbreviated to 3 characters when formatting. |
wxDate ( add-days long days)
Adds an integer number of days to the date, returning a new date object.
wxDate ( subtract-days long days)
Subtracts an integer number of days from the date, returning a new date object.
long ( subtract long date1 long date2)
Subtracts one date from another, return the number of intervening days.
bool ( add-self long days)
Adds an integer number of days to the date, returning TRUE if successful.
bool ( subtract-self long days)
Subtracts an integer number of days from the date, returning TRUE if successful.
bool ( lelong date)
Compare two dates, returning TRUE if the current date object is earlier than date.
bool ( leq long date)
Function to compare two dates, returning TRUE if the current date object is earlier or equal to date.
bool ( ge long date)
Function to compare two dates, returning TRUE if the current date object is later than date.
dboollong ( geq long date)
Function to compare two dates, returning TRUE if the current date object is later than or equal to date.
bool ( eq long date)
Function to compare two dates, returning TRUE if the current date object is equal to date.
bool ( neq long date)
Function to compare two dates, returning TRUE if the current date object is not equal to date.