Datetime: allow date-only and time-only display
- Dominant language
- Python
- Stars
- 5.7k
- Forks
- 1.1k
- Avg merge
- 12d 2h
- Merged PRs (30d)
- 1
Description
**What's your use case?**
I don't know if this is at all possible, but when looking at daily patterns it sometimes makes sense to consider `hh:mm:ss` without considering `yyyy:mm:dd` preceding it. Currently, if my data contains time by specifying `hh:mm:ss` only, Orange assumes that this time is specified for `1970-01-01`, so wherever the time appears in, for instance a data table, it is shown as `1970-01-01 hh:mm:ss`.
For instance, I'm currently working on a tutorial on classification of people's presence in a room in order to provide predictions for a smart thermostat based on day of the week and time of the day, where at some point I split up the datetime in date and time.
It is annoying that I have to tell my students why this date `1970-01-01` is always there, and, also it is annoying having to deal with this unnecessarily space-consuming datetime expression in, for instance inequalities showing up in Tree Viewer.
Likewise, if only `yyyy-mm-dd` is specified, it is always assumed that the time is `00:00:00`, which is then also displayed in all cases.
I vaguely remember this was different in the past but I'm not sure.
**What's your proposed solution?**
automatically disregard `yyyy-mm-dd` if it isn't specified, and also automatically disregard `hh:mm:ss` if it isn't specified.
**Are there any alternative solutions?**
In some cases, converting to a string using Formula, and removing the unneeded part helps for presentation purposes, but this won't work, for instance, in Tree Viewer.
Contributor guide
Research direction
Start by reproducing date-only and time-only values in a data table, then inspect how the same datetime is displayed in Tree Viewer and after splitting values with Formula. Trace the parsing and display paths involved; done means omitted date or time components are no longer rendered as 1970-01-01 or 00:00:00 when they were not specified, including in inequality labels.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data, data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100