format(),diff_for_humans(),in_words()andto_xxx_string()methods now return unicode strings.
1.3.1 - 2017-10-22
- Fixed inaccuracy of
in_days()method on DST transitions. - Fixed seconds inaccuracy for past datetimes.
1.3.0 - 2017-09-25
- Added support for the alternative formatter's tokens in
from_format(). - Added a
timezonesmodule attribute to expose available timezones. - Added the
exactkeyword toparse()which behaves exactly likestrict.
- Dropped support for Python 3.2 and 3.3.
- The
classicformatter infrom_format()is now deprecated.
- Fixed
thlocale. (Thanks to idxn)
1.2.5 - 2017-09-04
- Fixed normalization of microseconds in durations.
- Fixed microseconds not being included in
average(). (Thanks to ericfrederich)
1.2.4 - 2017-06-20
- Fixed parsing of the
nowstring.
1.2.3 - 2017-06-18
- Fixed behavior of some short timezones (like EST, MST or HST).
- Fixed warning when building C extensions.
1.2.2 - 2017-06-15
- Fixed
next()andprevious()hanging when passed an invalid input. - Fixed wrong result when adding/subtracting a Period if a DST transition occurs.
1.2.1 - 2017-05-23
- Fixed incorrect
foldattribute on Python 3.6 when not passing a timezone. (Thanks to neonquill)
1.2.0 - 2017-03-24
- Added support for EXIF-formatted strings in parser. (Thanks to emattiza)
- Improved performances when parsing ISO 8601 string with C extensions.
- Fixed parsing of ISO 8601 week dates.
- Fixed
euandsklocales. (Thanks to eumiro)
1.1.1 - 2017-03-14
- Fixed
diff_for_humans()when crossing DST transitions.
1.1.0 - 2017-02-20
- Added the
keep_timekeyword argument tonext()/previous()methods to keep time information.
- Greatly improved
diff()performance. - Improved
diff_for_humans()method to display more intuitive strings on edge cases. - Formatting (with f-strings or
format()) will now use the configured formatter.
1.0.2 - 2017-02-04
- Adds support for external tzinfo as timezones. (Thanks to iv597)
- Fixed
day_of_yearnot returning the correct value. (Thanks to asrenzo)
1.0.1 - 2017-01-25
- Fixed parsing, especially for strings in the form
31-01-01.
1.0.0 - 2017-01-17
- Using
PRE_TRANSITIONrule no longer produces a time in a DST gap. - Improved performances when adding time to a
Penduluminstance. - Improved parsing of ISO 8601 strings.
- Removed deprecated methods
0.8.0 - 2016-12-23
- Added
on()andat()methods which replacewith_date()andwith_time(). - Added a
strictkeyword argument toparse()to get the type matching the parsed string. - Added the ability to pass an amount to the
range()method to control the length of the gap. - Added a
datetime()helper method to theTimezoneclass.
- Improved parsing of ISO 8601 strings.
with_date()andwith_time()are deprecated. Useon()andat()instead.create_from_date()andcreate_from_time()are deprecated. Usecreate()instead.
0.7.0 - 2016-12-07
- Added a
Dateclass. - Added a
Timeclass. - Added experimental support for the
foldattribute introduced in Python 3.6. - Added a
remaining_daysproperty to theIntervalclass. - Added a
int_timestampproperty to thePendulumclass to retrieve the behavior of the now deprecatedtimestampproperty. start_of()/end_of()now supportshour,minuteandsecondunits.astimezone()now supports timezone strings.in_words()now displays subseconds when no other units are available.
Periodproperties (especiallyyearsandmonths) are now accurate.Interval.secondsnow returns the whole number of remaining seconds, liketimedelta, for compatibility. Useremaining_secondsto 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.
timestampshould now be used as a method and no longer as a property. It will be a native method in the next major version.Intervalproperties and methods related to years and months are now deprecated.Interval.days_exclude_weeksis now deprecated. Useremaining_daysinstead.
- Exception when loading specific timezones has been fixed.
end_of('day')now properly sets microseconds to999999.- Accuracy of
Periodinstances 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.
0.6.6 - 2016-11-25
- Fixed a memory leak in C extension. (thanks to ntoll)
0.6.5 - 2016-10-31
- Adds validation to
set_week_starts_at(),set_week_ends_at()andset_weekend_days(). (thanks to kleschenko) - Updates ukrainian localization. (thanks to kleschenko)
- Fixes loading of timezones without transitions.
- Fixes
Timezone.utcoffset(). (thanks to regnarock)
0.6.4 - 2016-10-22
- Adds support for
pytztimezones in constructor.
- Fixes behavior of
add()/subtract()methods for years, months and days when a DST transition occurs. - Fixes
range()behavior.
0.6.3 - 2016-10-19
- Makes
replace()accept the same tzinfo types as the constructor.
- Fixes
timezone_()not setting the tzinfo properly. - Fixes pickling/unpickling of Pendulum instances with fixed timezone.
0.6.2 - 2016-09-26
- Fixes timezones loading on Windows
0.6.1 - 2016-09-19
Penduluminstances can no longer be compared to strings and integers.
- Fixes
Timezone._convert()method for fixed timezones. - Fixes
instances()for sometzinfo. - Fixes comparisons to incompatible objects raising an error.
0.6.0 - 2016-09-12
- Adds an option to control transition normalization behavior.
- Adds a separator keyword argument to
Interval.in_words()method. - Adds an alternative formatter.
- Adds support for pretty much any
tzinfoinstance in theinstance()method. - Adds an
intersect()method to thePeriodclass.
- Improves meridians formatting by supporting minutes.
- Changes behavior of
create*()methods (time now defaults to00:00:00)
- Fixes setters and modifiers (start_of/end_of) to properly apply transitions.
- Fixes issue when compiling on 32 bit systems. (Thanks to guyzmo)
- Fixes NameError Exception on Python 3.2. (Thanks to guyzmo)
- Fixes absolute intervals.
0.5.5 - 2016-09-01
- Fixes local timezone loading for unix systems.
- Fixes potential
AttributeErrorinbetweenmethod. (Thanks to iv597)
0.5.4 - 2016-08-30
- Fixes broken previous release.
0.5.3 - 2016-08-29
- Fixes setters and modifiers (start_of/end_of) to properly apply DST transitions.
- Fixes timezone file loading on some installs (See #34) (Thanks to mayfield)
0.5.2 - 2016-08-22
- Adds a small speedup when changing timezones.
- Makes
.offset_hoursreturn a float.
- Fixes
TimezoneInfo.utcoffset()method. - Fixes arithmetic operations on intervals not returning intervals.
- Allows Pendulum instances comparison to None . (Thanks to jkeyes)
0.5.1 - 2016-08-18
- Fixes
now()not behaving properly when given a timezone. - Fixes double file opening when getting local timezone. (Thanks to yggdr)
- Fixes
pt_BRlocale. (Thanks to YomoFuno) - Fixes
pllocale. (Thanks to MichalTHEDUDE)
0.5 - 2016-08-15
This version introduces a new timezone library which improves timezone switching and behavior around DST transition times.
- Adds a new timezone library to properly normalize and localize datetimes.
Pendulumno longer relies onpytz. Check the Documentation to see what has changed exactly.
0.4 - 2016-07-26
This version mostly brings the new Period class and improves performances overall.
- Adds the
Periodclass, which basically is a datetime-aware interval.
- Makes the
format()method support alocalekeyword argument. - Changes custom directives.
%Pbecomes%_zand%tbecomes%_t. Basically, all new custom directives will be in the form%_{directive}.
- Fixes singular for negative values of intervals.
0.3.1 - 2016-07-13
- Fixes parsing of string with partial offset.
0.3 - 2016-07-11
This version causes major breaking API changes to simplify it and making it more intuitive.
- Improves testing by providing a
test()contextmanager.
- Makes passing a naive
datetimetoinstance()default toUTC. - Reduces
add_xxx()/sub_xxx()methods toadd(**kwargs)/subtract(**kwargs). - Changes the
for_humans()method of theIntervalclass toin_words()to avoid confusion with thediff_for_humans()method. - Makes more constants and methods available at module level.
- Makes the constructor behave like the standard one. No more
Pendulum(). - Renames the
to()method toin_timezone(). - Removes the comparison methods to just stick with the basic operators.
- Reduces
first_of_xxx()/last_of_xxx()/nth_of_xxx()methods tofirst_of(unit)/last_of(unit)/nth_of(unit, nth). - Reduces
start_of_xxx()/end_of_xxx()methods tostart_of(unit)/end_of(unit). - Removes the
diff_in_xxx()methods from thePendulumand addsin_xxx()methods to theIntervalclass. - Renames the
PendulumIntervalclass to simplyInterval. - Makes the
Pendulumclass immutable.
- Fixes "sl" locale.
0.2 - 2016-07-04
- Makes the
Pendulumclass truly inherits fromdatetime.
0.1.1 - 2016-07-04
- Adds support for the
TZenvironment variable. - Adds
closest()/farthest()comparison methods. - Adds min/max attributes. Renames min/max methods.
- Makes
set_test_now()available at module level.
- Fixes
diff_for_humans()method when setting locale.
0.1 - 2016-07-04
Initial release