facebook / facebook/duckling

Grain returned on time interval

Open
#270 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Haskell
Stars
4.3k
Forks
740
PR merge metrics
No merged PRs in 30d

Description

When using a message with a time interval like "from 26th oct until 27th oct 3pm", I'm getting the correct times (from '26-10-2018 00:00:00', to '27-10-2018 15:00:00'), but, in my opinion, wrong grain information. Both times are returning grain 'hour', but the 'from' time should be returning 'day' instead, while the 'to' grain is correct as 'hour'. The decision to use the less or more specific grain would then be on the developer using the library.

Is this the intended functionality for any reason?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.