Datetime functions in tremor std namespace #396
Labels
_complexity:medium
A task with a medium complexity that should be challanging
enhancement
New feature or request
good first issue
Good for newcomers
hacktoberfest
help wanted
Extra attention is needed
language
_size:medium
A medium sized task that will take some time to complete
Describe the problem you are trying to solve
A datetime module is absent from tremor-script stdlib right now. Functions related to datetime construction, parsing and formatting are useful in general for event processing needs.
There is already an underlying implementation for datetime functions in the tremor-script codebase (with datetime parse functionality utilized by datetime extractor) but the current implementation there needs rework and cleanup, so it was not exposed as part of tremor-script stdlib when the language got functions/modules (in v0.8).
As a workaround, these datetime functions can be currently accessed in tremor-script/trickle via
core::datetime
, and we as well as our users are relying on it for datetime needs (eg: as part of tests in the codebase itself). But this as a feature is intentionally undocumented so it's best if everyone moves away from it.Describe the solution you'd like
Explore and propose ways in which the datetime module interface/implementation can be improved for usability and maintainability (eg: a lot of the functions there can now be implemented directly in tremor-script instead of rust). This can evolve into a RFC if the changes are substantial.
After discussions with @tremor-rs/tremor-core, implement the changes proposed.
As part of the implementation, make sure that the datetime extractor's functionality remains intact (also clean-up the currently broken datetime function links as part of the extractor's docs).
Notes
Datetime module docs from pre 0.8 days:
https://github.com/tremor-rs/tremor-www-docs/blob/v0.7.3/docs/tremor-script/functions/datetime.md
As part of the cleanup, we can also take inspiration from other languages on how they expose such functionality.
The text was updated successfully, but these errors were encountered: