Github user ahgittin commented on the pull request:
https://github.com/apache/incubator-brooklyn/pull/682#issuecomment-109966335
Joda Time's parser is slightly better than Java's but it too is extremely
rigid. We'll need different formatter specifiers for `.` vs `-` vs ` ` and
`MM` vs `MMM` vs `MMMM` which becomes combinatorially tedious to express and
slow to execute. (Apache DateUtils is basically a wrapper around Java's so has
even worse drawbacks.) A flexible off-the-rack parser was my first hunt. I
tried `natty` for this reason (which is extremely cool but has drawbacks as
noted in the PR).
The other option is to mandate a single format but that makes things harder
to work with as people then have to look up the syntax. And although ISO 8601
is now a de facto standard for machines it makes for ugly blueprints.
---
Generally in Brooklyn we try to be lenient about parsing and encourage
natural-looking blueprints. Users seem to react well to that. I think the
same is warranted for date support, and I think this custom parser is the best
way. (I'd prefer it more if this could become a standard part of `DateUtils`
or similar but people tend to be opinionated on their dates!)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---