mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
Time filter improvements (#359)
* Adjust target directory so that ansible-test knows what to run when filters change. * Divide by multiple instead of multiplying with product of 1/factor to improve numerical robustness. * Allow to say what a year or month is (in days). * Add changelog fragment announcing the time filters. * Make sure unknown keyword args result in errors. * Fix formatting screw-up.
This commit is contained in:
parent
801b1edcbe
commit
0399127d11
4 changed files with 49 additions and 27 deletions
2
changelogs/fragments/filter-time.yml
Normal file
2
changelogs/fragments/filter-time.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- A new filter ``to_time_unit`` with specializations ``to_milliseconds``, ``to_seconds``, ``to_minutes``, ``to_hours``, ``to_days``, ``to_weeks``, ``to_months`` and ``to_years`` has been added. For example ``'2d 4h' | community.general.to_hours`` evaluates to 52.
|
Loading…
Add table
Add a link
Reference in a new issue