serokell / tzbot

Timezone bot for Slack
Mozilla Public License 2.0
7 stars 2 forks source link

Parse time references #1

Closed dcastro closed 2 years ago

dcastro commented 2 years ago

Clarification and motivation

We need to be able to parse references to points in time from Slack messages.

See the parseTimeRefs and TimeReference

A TimeReference should always contain a "time of day", which can be expressed using a 12-hour format:

Does 10am work for you?

That doesn't work for me, what about 10:30 AM?

Or a 24-hour format:

I can only be there at 16:00


It may also contain a reference to a certain day.

That reference can be expressed as:


It may also contain a reference to a certain timezone or timezone abbreviation or offset.


A slack message may contain more than one reference, e.g.:

Let's meet between 10am and 11:30am

Acceptance criteria