Skip to content

Releases: sdispater/pendulum

2.0.0

08 May 20:11
2.0.0
9c58884
Compare
Choose a tag to compare

Added

  • Added years and months support to durations.
  • Added the test_local_timezone() and set_local_timezone() helpers to ease testing.
  • Added support of ISO 8601 duration parsing.
  • Added support of ISO 8601 interval parsing.
  • Added a local() helper.
  • Added a naive() helper and a naive() method.
  • Added support for POSIX specification to extend timezones DST transitions.

Changed

  • Pendulum class has been renamed to DateTime.
  • Interval class has been renamed to Duration.
  • Changed and improved the timezone system.
  • Removed the create() helper.
  • Removed the utcnow() helper.
  • strict keyword argument for parse has been renamed to exact.
  • at() now supports setting partial time.
  • local, utc and is_dst are now methods rather than properties (is_local(), is_utc(), is_dst()).
  • Changed the repr of most common objects.
  • Made the strict keyword argument for parse false by default, which means it will not fallback on the dateutil parser.
  • Improved performances of the precise_diff() helper.
  • The alternative formatter is now the default one.
  • set_to_string_format()/reset_to_string_format() methods have been removed.
  • from_format() now uses the alternative formatter tokens.
  • Removed xrange() method of the Period class and made range() a generator.
  • New locale system which uses CLDR data for most of the translations.
  • diff_for_humans() now returns a few seconds where appropriate.
  • Removed Period.intersect().

1.5.1

25 Apr 00:05
1.5.1
41f5ac3
Compare
Choose a tag to compare
  • Fixed set() not acception the tz keyword argument.
  • Fixed datetime() not setting the timezone to UTC by default.

1.5.0

16 Apr 22:51
1.5.0
a8bf381
Compare
Choose a tag to compare

Added

  • Added the datetime() helper.
  • Added the set() method to set properties.
  • Added the is_utc() and is_local() methods.

Deprecated

  • year_(), month_(), day_(), hour_(), minute_(), second_(), microsecond_() are now deprecated.
  • timezone_() and tz_() are now deprecated.
  • timestamp_() is now deprecated.
  • with_date_time(), with_time_from_string() and with_timestamp() are now deprecated.
  • between() is now deprecated.
  • min_(), max_(), minimum(), maximum() are now deprecated.
  • is_today(), is_yesterday(), is_tomorrow() and is_same_day() are now depecreated.
  • is_sunday() -> is_saturday() are now deprecated.
  • The utc and local properties are now deprecated. Use is_utc() and is_local() instead.

1.4.4

21 Mar 07:00
1.4.4
55011d3
Compare
Choose a tag to compare

Fixed

  • Fixed extension building script.

1.4.3

20 Mar 23:54
1.4.3
11ac856
Compare
Choose a tag to compare

Fixed

  • Fixed an error when adding intervals to a Pendulum instance across DST transition.
  • Fixed an error when subtracting two pendulum instances in the same timezone.

1.4.1

05 Feb 19:42
1.4.1
e0f4030
Compare
Choose a tag to compare

Fixed

  • Fixed an error when comparing a Period to a timedelta in PyPy.
  • Fixed an offset error for datetimes between the before last and last transition.
  • Fixed unpickling with undefined / empty timezone name. (Thanks to Delgan)

1.4.0

22 Jan 16:03
1.4.0
117a26b
Compare
Choose a tag to compare

Changed

  • format(), diff_for_humans(), in_words() and to_xxx_string() methods now return unicode strings for Python 2.7.
  • Improved performance of now() and utcnow(). (Thanks to pganssle)

Fixed

  • Fixed from_format() raising an error with the alternative formatter.

1.3.2

16 Nov 20:20
1.3.2
6c2795e
Compare
Choose a tag to compare

Fixed

  • Fixed instance() behaviour with pytz offsets. (Thanks to pR0Ps)
  • Fixed deepcopy / pickle compatibility for TimezoneInfo. (Thanks to bolkedebruin)

1.3.1

22 Oct 21:08
1.3.1
425cbb5
Compare
Choose a tag to compare

Fixed

  • Fixed inaccuracy of in_days() method on DST transitions.
  • Fixed seconds inaccuracy for past datetimes.

1.3.0

25 Sep 20:18
1.3.0
bfc7313
Compare
Choose a tag to compare

Added

  • Added support for the alternative formatter's tokens in from_format().
  • Added a timezones module attribute to expose available timezones.
  • Added the exact keyword to parse() which behaves exactly like strict.

Changed

  • Dropped support for Python 3.2 and 3.3.
  • The classic formatter in from_format() is now deprecated.

Fixed

  • Fixed th locale. (Thanks to idxn)