finpricing.utils.date
#
Module Contents#
Classes#
- class finpricing.utils.date.Date(year: int, month: int, day: int)[source]#
- property is_weekend: bool#
Return True if the date is a weekend, False otherwise
Monday is 0 and Sunday is 6.
- MON = 0#
- TUE = 1#
- WED = 2#
- THU = 3#
- FRI = 4#
- SAT = 5#
- SUN = 6#
- classmethod convert_from_datetime(date: datetime.date | Date) Date [source]#
Return a Date object from a datetime.date object
- classmethod convert_from_datetimes(dates: list[datetime.date | Date]) list[Date] [source]#
Return a list of Date objects from a list of datetime.date objects
- classmethod from_datetime(date: datetime.date) Date [source]#
Return a Date object from a datetime.date object
- classmethod from_tuple(date_tuple: tuple) Date [source]#
Return a Date object from a tuple of (year, month, day)
- add_interval(time_interval: TimeInterval) Date [source]#