Closed ntwilson closed 1 year ago
Hey! Sorry this got ignored, as it and your other PR look like great additions. Would you mind resolving the conflicts there are in this now and I'll get it included? (Or I'll update it soon™ if you no longer have the time/inclination).
Thanks for the update! Yeah I'd love to get these PRs back in working order, when time permits.
Hey @garyb, sorry for the delay there but I think this PR (and #73) are ready to go now!
Thanks very much!
Description of the change Fixes #70. Placeholders that contain any valid format characters are escaped via square brackets. I.e.,
Placeholder " YYYY "
will become"[ YYYY ]"
, following the momentjs formatting rules. Notably, this PR makes bracket characters invalid in a Placeholder string, since all brackets are used exclusively for escaping. I could add support for escaping the brackets, i.e.,parseFormatString "\[YYYY\]" == Right (Placeholder "[" : YearFull : Placeholder "]" : Nil)
though I saw no of support for this behavior from momentjs, which seems to be the inspiration for this library's format strings.Checklist: