jinja2-time
jinja2-time copied to clipboard
Use Arrow's shift() instead of replace() to modify dates
trafficstars
Previously, the replace() method from arrow was shifting the date
when the arguments were using the plural form. Since Arrow 0.9.0, this
has been deprecated in favor of a shift() method. Arrow 0.14.5
completely removed the ability for replace() to shift dates. This
leads to errors like AttributeError: unknown attribute: "hours" when
using plural form.
This commit replace the use of replace() by shift() since the
intent is always to shift the current date.