It would be nice to be able to input "today" in the time edit interface in order to get today date. It would be useful in Wikidata for properties like "date of retrieval".
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T87764 Bugs related to time datatype (tracking) | |||
Open | None | T76859 Allows to input of plain text such as "today" in time edit widget | |||
Resolved | • adrianheine | T109457 [Story] Simplify input for dates |
Event Timeline
Hmm, I thought I already filled a bug for this. Would be nice to be able to add relative things like "today", "now", "tomorrow", "yesterday" and this gets expanded to the actual date (and maybe time in the future).
Should this be a fixed keyword like in SQL and programming languages, namely "now"? It would be "now" in all languages then. It may not be easy to type in certain languages. But the good thing is: Its the same everywhere, every time.
I assume we want this translated.
I suggest to not do more than the current date (and possibly time). I suggest to implement a CurrentTimeParser that understands "now" and "today" in localized as well as canonical English form. But nothing else. Not "yesterday". Not stuff like "-2 days" like it is possible in PHPs date parser. This is fairly easy.
Discussed with @Lydia_Pintscher during lunch.
- As a server side feature this will not work as expected. The server may be in an other day than the user, resulting in the previous or next day, not the one the user expected.
- We could take the users time zone setting into account. But this is not 100% correct in all cases, and it's not there for anonymous users. So not really a solution.
- Conclusion: Should be a JavaScript feature.
- Either a full featured date picker. But we should not implement our own, but reuse the OOjs core one, if it exists.
- Or a tiny "today" button. But this should be blocked on T109457: [Story] Simplify input for dates, because adding an other button is not a good idea.
Meanwhile, a new gadget (currentDate) automatically fills in the date of today while using the property "retrieved".