A class for manipulating dates.
date-add-months
date-add-weeks
date-add-years
date-create
date-create-julian
date-create-string
date-delete
date-format
date-get-day
date-get-day-of-week
date-get-day-of-week-name
date-get-day-of-year
date-get-days-in-month
date-get-first-day-of-month
date-get-julian-date
date-get-month
date-get-month-end
date-get-month-name
date-get-month-start
date-get-week-of-month
date-get-week-of-year
date-get-year
date-get-year-end
date-get-year-start
date-is-leap-year
date-set-current-date
date-set-julian
date-set-date
date-set-format
date-set-option
date-add-days
date-subtract-days
date-subtract
date-add-self
date-subtract-self
date-le
date-leq
date-ge
date-geq
date-eq
date-neq
long ( date-add-months long date long months)
Adds the given number of months to the date, returning 1 if successful.
long ( date-add-weeks long date long weeks)
Adds the given number of weeks to the date, returning 1 if successful.
long ( date-add-years long date long years)
Adds the given number of months to the date, returning 1 if successful.
long ( date-create)
Constructs a date object, initialized to zero. You are responsible for deleting this object when you have finished with it.
long ( date-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.
long ( date-create-julian long julian)
Constructor taking an integer representing the Julian date.
long ( date-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:
(bind ?date (date-create-string "11/26/1966"))
long ( date-delete long date)
Deletes the date object.
string ( date-format long date)
Formats the date into a string according to the current display type.
long ( date-get-day long date)
Returns the numeric day (in the range 1 to 365).
long ( date-get-day-of-week long date)
Returns the integer day of the week (in the range 1 to 7).
string ( get-day-of-week-name long date)
Returns the name of the day of week.
long ( date-get-day-of-year long date)
Returns the day of the year (from 1 to 365).
long ( date-get-days-in-month long date)
Returns the number of days in the month (in the range 1 to 31).
long ( date-get-first-day-of-month long date)
Returns the day of week that is first in the month (in the range 1 to 7).
long ( date-get-julian-date long date)
Returns the Julian date.
long ( date-get-month long date)
Returns the month number (in the range 1 to 12).
long ( date-get-month-end long date)
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 ( date-get-month-name long date)
Returns the name of the month.
long ( date-get-month-start long date)
Returns a new date representing the first day of the month. The new date must be deleted when it is finished with.
long ( date-get-week-of-month long date)
Returns the week of month (in the range 1 to 6).
long ( date-get-week-of-year long date)
Returns the week of year (in the range 1 to 52).
long ( date-get-year long date)
Returns the year as an integer (such as '1995').
long ( date-get-year-end long date)
Returns a new date the date representing the last day of the year. Delete the new date when you have finished with it.
long ( date-get-year-start long date)
Returns a new date the date representing the first day of the year. Delete the new date when you have finished with it.
long ( date-is-leap-year long date)
Returns 1 if the year of this date is a leap year.
long ( date-set-current-date long date)
Sets the date to current system date.
long ( date-set-julian long date long julian)
Sets the date to the given Julian date.
long ( date-set-date long 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.
long ( date-set-format long date 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. |
long ( date-set-option long date 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. |
long ( date-add-days long date long days)
Adds an integer number of days to the date, returning a new date object.
long ( date-subtract-days long date long days)
Subtracts an integer number of days from the date, returning a new date object.
long ( date-subtract long date long date1 long date2)
Subtracts one date from another, return the number of intervening days.
long ( date-add-self long date long days)
Adds an integer number of days to the date, returning 1 if successful.
long ( date-subtract-self long date long days)
Subtracts an integer number of days from the date, returning 1 if successful.
long ( date-le long date1 long date2)
Function to compare two dates, returning 1 if date1 is earlier than date2.
long ( date-leq long date1 long date2)
Function to compare two dates, returning 1 if date1 is earlier than or equal to date2.
long ( date-ge long date1 long date2)
Function to compare two dates, returning 1 if date1 is later than date2.
long ( date-geq long date1 long date2)
Function to compare two dates, returning 1 if date1 is later than or equal to date2.
long ( date-eq long date1 long date2)
Function to compare two dates, returning 1 if date1 is equal to date2.
long ( date-neq long date1 long date2)
Function to compare two dates, returning 1 if date1 is not equal to date2.