Skip to content

Commit fbec661

Browse files
authored
Bump version to 1.1.0 and update CHANGELOG (#963)
* Bump version to 1.1.0 and update CHANGELOG * Suggested changes * Break up comment
1 parent 699198c commit fbec661

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

CHANGELOG.rst

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,54 @@
11
Changelog
22
=========
33

4+
1.1.0 (2021-04-26)
5+
------------------
6+
7+
- [NEW] Implemented the ``dehumanize`` method for ``Arrow`` objects. This takes human readable input and uses it to perform relative time shifts, for example:
8+
9+
.. code-block:: python
10+
11+
>>> arw
12+
<Arrow [2021-04-26T21:06:14.256803+00:00]>
13+
>>> arw.dehumanize("8 hours ago")
14+
<Arrow [2021-04-26T13:06:14.256803+00:00]>
15+
>>> arw.dehumanize("in 4 days")
16+
<Arrow [2021-04-30T21:06:14.256803+00:00]>
17+
>>> arw.dehumanize("in an hour 34 minutes 10 seconds")
18+
<Arrow [2021-04-26T22:40:24.256803+00:00]>
19+
>>> arw.dehumanize("hace 2 años", locale="es")
20+
<Arrow [2019-04-26T21:06:14.256803+00:00]>
21+
22+
- [NEW] Made the start of the week adjustable when using ``span("week")``, for example:
23+
24+
.. code-block:: python
25+
26+
>>> arw
27+
<Arrow [2021-04-26T21:06:14.256803+00:00]>
28+
>>> arw.isoweekday()
29+
1 # Monday
30+
>>> arw.span("week")
31+
(<Arrow [2021-04-26T00:00:00+00:00]>, <Arrow [2021-05-02T23:59:59.999999+00:00]>)
32+
>>> arw.span("week", week_start=4)
33+
(<Arrow [2021-04-22T00:00:00+00:00]>, <Arrow [2021-04-28T23:59:59.999999+00:00]>)
34+
35+
- [NEW] Added Croatian, Latin, Latvian, Lithuanian and Malay locales.
36+
- [FIX] Internally standardize locales and improve locale validation. Locales should now use the ISO notation of a dash (``"en-gb"``) rather than an underscore (``"en_gb"``) however this change is backward compatible.
37+
- [FIX] Correct type checking for internal locale mapping by using ``_init_subclass``. This now allows subclassing of locales, for example:
38+
39+
.. code-block:: python
40+
41+
>>> from arrow.locales import EnglishLocale
42+
>>> class Klingon(EnglishLocale):
43+
... names = ["tlh"]
44+
...
45+
>>> from arrow import locales
46+
>>> locales.get_locale("tlh")
47+
<__main__.Klingon object at 0x7f7cd1effd30>
48+
49+
- [FIX] Correct type checking for ``arrow.get(2021, 3, 9)`` construction.
50+
- [FIX] Audited all docstrings for style, typos and outdated info.
51+
452
1.0.3 (2021-03-05)
553
------------------
654

arrow/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.3"
1+
__version__ = "1.1.0"

0 commit comments

Comments
 (0)