quantlib.time.date

Functions

days(Period p)

Converts the period into days as a float.

end_of_month(Date date)

Returns the last day of the month to which the given date belongs.

is_end_of_month(Date date)

Returns True if the date is the last day of its month.

is_leap(int year)

Returns True if the given year is a leap year.

local_date_time()

Returns the local date and time, based on the time zone settings of the computer.

maxdate()

Returns the latest allowed date in QuantLib.

mindate()

Returns the earliest allowed date in QuantLib.

months(Period p)

Converts the period intho months as a float.

next_weekday(Date date, int weekday)

Returns the next given weekday following or equal to the given date.

nth_weekday(int size, int weekday, ...)

Return the n-th given weekday in the given month and year.

pydate_from_qldate(Date qdate)

Converts a PyQL Date to a datetime.date object.

qldate_from_pydate(pydate)

Converts a datetime.date to a PyQL date.

today()

Returns today's date.

universal_date_time()

Returns the UTC date and time.

weeks(Period p)

Converts the period into weeks as a float.

years(Period p)

Converts the period into years as a float.

Classes

Date([day, month, year, hours, minutes, seconds])

Concrete date class.

Month(value)

Period(*args)

Class providing a Period (length + time unit) class and implements a limited algebra.

TimeUnit(value)

Weekday(value)