croz-ltd / Rocket.Chat.App-Remind

13 stars 4 forks source link

Poor "Time Formatting" in README #6

Open accessfletch opened 3 years ago

accessfletch commented 3 years ago

I'm trying to set a reminder, but am having trouble with the time formatting.

As the README says, the app is using agenda.js and its time formatting rules... but as a non-programmer, I can't seem to tell what those rules are.

If I enter /remind me to test at 12:14 pm (or /remind me to test at 12:14pm, for that matter), I get the "fail to understand" message.

What would be the proper format for a specific time... or a specific date?

shoei101 commented 3 years ago

from what i've seen, it's kind of like a timer, so you have to say "/remind me to test in 10 minutes" or "in 2 hours" I'm hoping with the future updates we will be able to just put a time like an alarm.

With that all said, i'm having issues getting the reminders to even show...

fakepop commented 3 years ago

As per agenda.js, it uses Human Interval.

I'd be great if it indeed supported dates / times, and also relative time such as "tomorrow at 8am" or "Friday at 3pm".

robertfromont commented 3 years ago

It appears to use a fixed template:
/remind who to what in when

If you put
/remind me to test in at 12:14 pm
...the command is accepted.

@mjovanovic0 it would be great if at could replace in in the command template. Looks like that change could be added at/after https://github.com/croz-ltd/Rocket.Chat.App-Remind/blob/e8545a64fb44fe10eb71edc6ce6c51c6491a9d4a/src/Command/RemindCommand.ts#L38

Maybe something like:

...
        const lastIn: number = fullCommand.lastIndexOf(' in ');
        const lastAt: number = fullCommand.lastIndexOf(' at ');
        const when: string = fullCommand.substring((lastIn>=0?lastIn:lastAt) + 4);

        if (lastIn <= 0 && lastAt <= 0) {
...

(and tweak the response message to use 'at' when the user does)

mjovanovic0 commented 3 years ago

Hi all,

I just submitted new version of app. This version includes in and at option for selector of time component.

Will try to implement particular time (like 12:14 pm, or 1.1.2022) reference in the following update.

shoei101 commented 3 years ago

Is this project dead?