utils
Core utility functions for date conversions and related helpers.
Functions:
-
pydate_to_qldate–Convert a Python date object to a QuantLib date object.
-
qldate_to_pydate–Convert a QuantLib date to a Python date.
-
qldate_to_string–Convert a QuantLib date to a string.
pydate_to_qldate
pydate_to_qldate(date: date) -> Date
Convert a Python date object to a QuantLib date object.
Parameters:
-
(datedate) –The Python date object to be converted.
Returns:
-
Date–The corresponding QuantLib date object.
qldate_to_pydate
qldate_to_pydate(date: Date) -> date
Convert a QuantLib date to a Python date.
Parameters:
-
(dateDate) –The QuantLib date to be converted.
Returns:
-
date–The equivalent Python date.
qldate_to_string
qldate_to_string(date: Date) -> str
Convert a QuantLib date to a string.
Parameters:
-
(dateDate) –The QuantLib date to be converted.
Returns:
-
str–A string in
YYYY/MM/DDformat.