Added
- Added a
Date
class. - Added a
Time
class. - Added experimental support for the
fold
attribute introduced in Python 3.6. - Added a
remaining_days
property to theInterval
class. - Added a
int_timestamp
property to thePendulum
class to retrieve the behavior of the now deprecatedtimestamp
property. start_of()
/end_of()
now supportshour
,minute
andsecond
units.astimezone()
now supports timezone strings.in_words()
now displays subseconds when no other units are available.
Changed
Period
properties (especiallyyears
andmonths
) are now accurate.Interval.seconds
now returns the whole number of remaining seconds, liketimedelta
, for compatibility. Useremaining_seconds
to retrieve the previous behavior.- Improved parsing performances for common formats.
- The library no longer relies on
pytz
. It now depends on pytzdata for its timezone database. - Locale, test instance and formatter are now set gobally at the module level when using the corresponding module methods.
Deprecated
timestamp
should now be used as a method and no longer as a property. It will be a native method in the next major version.Interval
properties and methods related to years and months are now deprecated.Interval.days_exclude_weeks
is now deprecated. Useremaining_days
instead.
Fixed
- Exception when loading specific timezones has been fixed.
end_of('day')
now properly sets microseconds to999999
.- Accuracy of
Period
instances properties has been improved. - Accuracy for microseconds when initializing a Pendulum instance in some timezones has been fixed.
- Periods are now serializable with
pickle
. - Fixed
minute_()
,second_()
andmicrosecond_()
setters changing the hour unit. - Fixed Windows support.