Features:
- Ported to TypeScript.
- Support for many more static constructor and instance methods.
- Constant min, max, and resolution values for date, time, datetime, and timedelta.
- Constructors of datetime and timedelta better match their Python counterparts.
- Overloaded assumption constructor behavior is now handled by static constructor methods like it is in Python datetime.
- Constructor input validation.
- Changed timestamp units from milliseconds to seconds.
- Changed timedelta internal units to
days
,seconds
, andmilliseconds
.- Timedeltas can still be set using other units but will get properly distributed among the three internal units.
Fixes:
- Stringified datetimes and times no longer include milliseconds unless present like Python datetimes/times.
- Stringified timedeltas now include days if larger than one day.
- Fix weeks not being used in timedelta deconstruction.
- Fix a test that failed in the US due to daylight savings time.