jinja2-time icon indicating copy to clipboard operation
jinja2-time copied to clipboard

Use Arrow's shift() instead of replace() to modify dates

Open vincentbernat opened this issue 6 years ago • 0 comments
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.

vincentbernat avatar Nov 03 '19 06:11 vincentbernat