aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_pagination.py
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2019-09-23 21:13:47 +0200
committerGravatar Sebastiaan Zeeff <[email protected]>2019-09-23 21:31:19 +0200
commitfba165037943fda90039ec9cadf0649cfae0e781 (patch)
tree4469b2b431316ca7e4829fdbc21aeb52844eba0d /tests/test_pagination.py
parentMake DEFCON days subcommand enable DEFCON (#405) (diff)
Fix failing duration conversion
https://github.com/python-discord/bot/issues/446 The current ExpirationDate converter does not convert duration strings to `datetime.datetime` objects correctly. To remedy the problem, I've written a new Duration converter that uses regex matching to extract the relevant duration units and `dateutil.relativedelta.relativedelta` to compute a `datetime.datetime` that's the given duration in the future. I've left the old `ExpirationDate` converter in place for now, since the new Duration converter may not be the most optimal method. However, given the importance of being able to convert durations for moderation tasks, I think it's better to implement Duration now and rethink the approach later. This commit closes #446
Diffstat (limited to 'tests/test_pagination.py')
0 files changed, 0 insertions, 0 deletions