Contents Up Previous Next

wxDate is-a wxObject

A class for manipulating dates.


Not yet implemented.

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


wxDate add-months

bool ( add-months long months)

Adds the given number of months to the date, returning TRUE if successful.


wxDate add-weeks

bool ( add-weeks long weeks)

Adds the given number of weeks to the date, returning TRUE if successful.


wxDate add-years

bool ( add-years long years)

Adds the given number of months to the date, returning TRUE if successful.


wxDate create

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.


wxDate create-julian

bool ( create-julian long julian)

Constructor taking an integer representing the Julian date.


wxDate create-string

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"))

wxDate format

string ( format)

Formats the date into a string according to the current display type.


wxDate get-day

long ( get-day)

Returns the numeric day (in the range 1 to 365).


wxDate get-day-of-week

long ( get-day-of-week)

Returns the integer day of the week (in the range 1 to 7).


wxDate get-day-of-week-name

string ( day-of-week-name)

Returns the name of the day of week.


wxDate get-day-of-year

long ( get-day-of-year)

Returns the day of the year (from 1 to 365).


wxDate get-days-in-month

long ( get-days-in-month)

Returns the number of days in the month (in the range 1 to 31).


wxDate get-first-day-of-month

long ( get-first-day-of-month)

Returns the day of week that is first in the month (in the range 1 to 7).


wxDate get-julian-date

long ( get-julian-date)

Returns the Julian date.


wxDate get-month

long ( get-month)

Returns the month number (in the range 1 to 12).


wxDate get-month-end

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.


wxDate get-month-name

string ( get-month-name)

Returns the name of the month.


wxDate get-month-start

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.


wxDate get-week-of-month

long ( get-week-of-month)

Returns the week of month (in the range 1 to 6).


wxDate get-week-of-year

long ( get-week-of-year)

Returns the week of year (in the range 1 to 52).


wxDate get-year

long ( get-year)

Returns the year as an integer (such as '1995').


wxDate get-year-end

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

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.


wxDate is-leap-year

bool ( is-leap-year)

Returns TRUE if the year of this date is a leap year.


wxDate set

bool ( set)

Sets the date to current system date.


wxDate set-julian

bool ( set-julian long julian)

Sets the date to the given Julian date.


wxDate set-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.


wxDate set-format

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.


wxDate set-option

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

wxDate ( add-days long days)

Adds an integer number of days to the date, returning a new date object.


wxDate subtract-days

wxDate ( subtract-days long days)

Subtracts an integer number of days from the date, returning a new date object.


wxDate subtract

long ( subtract long date1 long date2)

Subtracts one date from another, return the number of intervening days.


wxDate add-self

bool ( add-self long days)

Adds an integer number of days to the date, returning TRUE if successful.


wxDate subtract-self

bool ( subtract-self long days)

Subtracts an integer number of days from the date, returning TRUE if successful.


wxDate le

bool ( lelong date)

Compare two dates, returning TRUE if the current date object is earlier than date.


wxDate leq

bool ( leq long date)

Function to compare two dates, returning TRUE if the current date object is earlier or equal to date.


wxDate ge

bool ( ge long date)

Function to compare two dates, returning TRUE if the current date object is later than date.


wxDate geq

dboollong ( geq long date)

Function to compare two dates, returning TRUE if the current date object is later than or equal to date.


wxDate eq

bool ( eq long date)

Function to compare two dates, returning TRUE if the current date object is equal to date.


wxDate neq

bool ( neq long date)

Function to compare two dates, returning TRUE if the current date object is not equal to date.