sportsstats package¶
Submodules¶
sportsstats.utils module¶
utils
Utilities used in sportsstats
-
sportsstats.utils.add_years(dt, years)[source]¶ Add (or subtract) years, handling leap years.
- Args:
- dt (datetime): The datetime object. years (int): Positive or negative number of years to add.
- Returns:
- datetime: The same calendar date (month and day) in the
- destination year, if it exists, otherwise use the following day (thus changing February 29 to March 1).