bot icon indicating copy to clipboard operation
bot copied to clipboard

Allow passing end time to `!remind`

Open TizzySaurus opened this issue 4 years ago • 5 comments

This issue proposes allowing users to specify the end time of a reminder as the duration, instead of a relative time (e.g. !remind "01-11-2021 08:00" example instead of !remind 16h38M example).

This would mean the user doesn't have to do the maths of "how far away is the time I want", but would also mean we'd have to come up with some sort of parsing for the time, potentially with support for !remind 08:00 example (send reminder whenever the next occurrence of 8am is) and/or !remind "01-11-2021 08:00UTC+1" example (specifying timezone instead of defaulting to UTC).

TizzySaurus avatar Oct 31 '21 15:10 TizzySaurus

Does this code runs on 3.10 version? Maybe it can be done with the new pattern matching feature.

Hashed0719 avatar Nov 28 '21 02:11 Hashed0719

@zeph-yrus9 The bot only runs on Python 3.9 right now, so unfortunately not.

bsoyka avatar Nov 28 '21 02:11 bsoyka

Note: The DayDuration converter added in #2001 (specifically in commit f8ea3e8) may be of use here -- would need to be extended to support day/month/year though.

TizzySaurus avatar Dec 10 '21 09:12 TizzySaurus

I'd like to implement this.

EDIT: Just noticed that @TizzySaurus is assigned, so if you don't want to implement it (since it been a month), I can. :D

onerandomusername avatar Dec 17 '21 05:12 onerandomusername

Module "re" in standard library may also be of help here.

Hashed0719 avatar Dec 17 '21 05:12 Hashed0719