picard
picard copied to clipboard
PICARD-2250: Add `$parsedate()` function
Summary
- This is a…
- [ ] Bug fix
- [x] Feature addition
- [ ] Refactoring
- [ ] Minor / simple change (like a typo)
- [ ] Other
-
Describe this change in 1-2 sentences: Add new
$parsedate()
function that uses thedateutil.parser.parse
method.
Problem
- JIRA ticket (optional): PICARD-2250
There is currently no scripting function capable of parsing dates in a variety of formats, including months as text.
Solution
Add a new $parsedate()
function that uses the dateutil.parser.parse
method. This allows parsing input dates such as "September 23, 2017" or "23 Sept 2017" into "YYYY-MM-DD" format for use with other date-related scripting functions.
Action
Update documentation.
My only concern is that I had thought after our recent discussion that we might get completely rid of the dateutil dependency.
Is there any concrete use case for this function?
@zas what do you think?
My only concern is that I had thought after our recent discussion that we might get completely rid of the dateutil dependency.
Oh right. I forgot about that.
Is there any concrete use case for this function?
I have no examples.
I was only adding this to complete our date handling functions. Since nobody else has requested such functionality, perhaps it might be best to drop it for now and cancel this PR.
@zas what do you think?
Well, we can introduce such feature at any time, and we wanted to get rid of dateutil
dependency, so I would keep this PR for later.