OpenRefine: Documentation missing for toDate(locale,format)
When the enhancement to toDate() requested in #729 was added in fa072df85c27ce601f867a7f39c5a5d1bf288dec 9 years ago (!), no documentation was included. The online help and the documentation should be updated to reflect the current code.
The test cases show how the list of format strings can be prepended with a string identifying the locale which should be used for the parsing attempts:
Docs to be updated:
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 2
- Comments: 16 (6 by maintainers)
@amyra98 That’s very close. I would slightly tweak your statement to say “the
formattingparsing function will use the formatting rules for that locale.”Also, as @ostephens pointed out, the current help is completely wrong (looks like it was cut & paste from
toString()and not updated), so I would suggest starting from scratch and rewriting it.Slightly separate to the need to add the
localeaspect to the documentation, but that description infun_to_datedoes not seem correct to me:The arguments available to the
toDatefunction control how the inputted object is interpreted as a date, not what the output format is (the output of a successful toDate function will always be a date object)It is also not the case that “Without arguments, it returns the ISO 8601 extended format” - again with or without arguments
toDatereturns a date object. I’m not sure what this statement was really trying to say that the display of the dates in the OpenRefine UI uses ISO8601 extended, or something else. If it was indicating how the date would be displayed in the UI once again the arguments given totoDatedon’t affect this at all