Open bytrangle opened 1 week ago
The isOnlyTime()
(and isOnlyDate()
) belong to ParsingComponents
(not ParsedComponents
), an internal class/type for writing parsers and refiners. The method should be used with caution (e.g. calling isOnlyTime() on a relative date like "1 day ago" may not be correct).
I'm hesitating to expose those methods to the more visible ParsedComponents
type.
Could you explain your use case and the need for the methods to be included in the result type?
Thanks for getting back. The to-do app Super Productivity allows users to add start date for their to-dos using natural language, backed by chrono
:).
If a user only enters time with no date, how should you interpret it?
For example: "Laundry 4pm".
The start date for this task will depend on when the user creates the task:
Hope that makes sense, although I've started to see how using isOnlyTime()
carelessly will open a can of bugs!
For the ParsedComponents, I'm able to call
isCertain()
, but notisOnlyTime()
. The only methods available according to Intellisense areget()
,date()
,get()
, andtags()
. I'm using the latest version, 2.7.7.