0

What's it called when you can use English language to explain a date?

For example, on today's date... the user enters the quoted phrase and it = the date:

  • "this Saturday" = Saturday, September 19, 2020
  • "next Saturday" = Saturday, September 26, 2020
  • "next Monday at 3pm" = Monday, September 21, 2020 at 3:00PM

What is the name for this type of input? I use an app called Todoist and I would like to replicate it in a program I have.

enter image description here

1 Answer 1

3

This is often referred to as "relative time".

As you've seen, relative times are often used to describe a time that's offset from the current time in instances where it might be easier for the user to process, more convenient, or not as important as the exact time.

Use caution when working with relative times, as they can sometimes be ambiguous. If I'm going to bed shortly after midnight, and I create a reminder for "take the trash out tomorrow morning", I probably mean for that to happen in ~8 hours even though what I said wasn't precisely correct. It's important to provide visibility of the exact time that is calculated, so the user can verify that things were interpreted correctly. I've experienced modern voice assistants ask for clarification when I ask for something potentially ambiguous like that. I think that'd be appropriate here as well.

1
  • Perfect. I was having trouble looking for libraries and more information on this. Thanks for the detailed explanation, as well. Sep 18, 2020 at 21:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.