./time/py-pendulum, Human-friendly date and time handling

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 2.1.0, Package name: py37-pendulum-2.1.0, Maintainer: pkgsrc-users

Native datetime instances are enough for basic cases but when you face
more complex use-cases they often show limitations and are not so
intuitive to work with. Pendulum provides a cleaner and more easy to use
API while still relying on the standard library. So it's still datetime
but better.

Unlike other datetime libraries for Python, Pendulum is a drop-in
replacement for the standard datetime class (it inherits from it), so,
basically, you can replace all your datetime instances by Pendulum
instances in you code (exceptions exist for libraries that check the type
of the objects by using the type function like sqlite3 or PyMySQL for
instance).

It also removes the notion of naive datetimes: each Pendulum instance is
timezone-aware and by default in UTC for ease of use.

Pendulum also improves the standard timedelta class by providing more
intuitive methods and properties.


Required to run:
[devel/py-setuptools] [time/py-dateutil] [time/py-tzdata] [lang/python37]

Required to build:
[pkgtools/cwrappers]

Master sites:

SHA1: b2d111f3a59083a98e1f606a2e85b3215c9494fb
RMD160: aa591c8267ffdcf5688d446c1d0238cf331145e0
Filesize: 78.706 KB

Version history: (Expand)


CVS history: (Expand)


   2020-03-21 13:54:50 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-pendulum: updated to 2.1.0

2.1.0:

Added
Added better typing and PEP-561 compliance
Added the is_anniversary() method as an alias of is_birthday()

Changed
Dropped support for Python 3.4.
is_utc() will now return True for any datetime with an offset of 0, similar to \ 
the behavior in the 1.* versions
Duration.in_words() will now return 0 milliseconds for empty durations.

Fixed
Fixed various issues with timezone transitions for some edge cases
Fixed out of bound detection for nth_of("month")
Fixed an error where extra text was accepted in from_format()
Fixed a recursion error when adding time to a DateTime with a fixed timezone
Fixed errors where Period instances were not properly compared to other classes, \ 
especially timedelta instances
Fixed deprecation warnings due to internal regexps
Fixed an error where the test() helper would not unset the test instance when an \ 
exception was raised
Fixed an error where the week_of_month attribute was not returning the correct value
Fixed an error in the way the Z ISO-8601 UTC designator was not parsed as UTC

Locales
Added the nl locale.
Added the it locale.
Added the id locale.
Added the nb locale.
Added the nn locale.
   2019-07-18 13:29:30 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-pendulum: updated to 2.0.5

2.0.5:

Fixed
* Fixed ISO week dates not being parsed properly in from_format().
* Fixed loading of some timezones with empty posix spec.
* Fixed deprecation warnings.

Locales
* Added RU locale.
   2019-05-02 11:16:48 by Adam Ciarcinski | Files touched by this commit (10)
Log message:
Forget about Python 3.4
   2018-11-14 11:31:58 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-pendulum: updated to 2.0.4

2.0.4:
Fixed from_format() not recognizing input strings when the specified pattern had \ 
escaped elements.
Fixed missing x token for string formatting.
Fixed reading timezone files.
Added support for parsing padded 2-digit days of the month with from_format()
Fixed from_format() trying to parse escaped tokens.
Fixed the z token timezone parsing in from_format() to allow underscores.
Fixed C extensions build errors.
Fixed age calculation for future dates.
   2018-08-14 17:23:51 by Leonardo Taccari | Files touched by this commit (2)
Log message:
py-pendulum: Disable C Extensions when building the 2.7 multi-package

C Extensions code does not seem supported when it is built with Python 2.7.
Pass the environment variable to avoid compiling it and failing and adjust PLIST
accordingly.

Reported via #pkgsrc by Juraj Lutter, thanks!
   2018-08-07 12:09:43 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-pendulum: updated to 2.0.3

2.0.3:
Fixed handling of pytz timezones.
Fixed some formatter's tokens handling.
Fixed errors on some systems when retrieving timezone from localtime files.
Fixed diff methods.
Fixed closest()/farthest() methods.
   2018-06-16 15:06:54 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-pendulum: updated to 2.0.2

2.0.2:
Fixed the weeks property for negative Period instances.
Fixed start_of() methods not setting microseconds to 0.
Fixed errors on some systems when retrieving timezone from clock files.
Fixed parsing of partial time.
Fixed parsing not raising an error for week 53 for ordinary years.
Fixed string formatting not supporting strftime format.

2.0.1:
Fixed behavior of the YY token in from_format().
Fixed errors on some systems when retrieving timezone from clock files.
   2018-04-26 09:53:20 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-pendulum: updated to 1.5.1

1.5.1
Fixed set() not acception the tz keyword argument.
Fixed datetime() not setting the timezone to UTC by default.

1.5.0
Added the datetime() helper.
Added the set() method to set properties.
Added the is_utc() and is_local() methods.
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.