Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix processing of date formats containing square brackets #18

Merged
merged 2 commits into from Jan 7, 2022

Conversation

ebullient
Copy link
Owner

  • 🐛 Handle moment formats containing []
  • 🚸 Revise setting descriptions

@ebullient ebullient merged commit ebb92ae into main Jan 7, 2022
@ebullient ebullient deleted the datestring branch January 7, 2022 21:26
@wenlzhang
Copy link

With version 0.6.3, when configured with [✅:: YYYY-MM-DD], the appended text is still without brackets for me, e.g. ✅:: 2022-01-08 is appended.

@ebullient
Copy link
Owner Author

ebullient commented Jan 8, 2022

With version 0.6.3, when configured with [✅:: YYYY-MM-DD], the appended text is still without brackets for me, e.g. ✅:: 2022-01-08 is appended.

You need to use moment formatting for constant values? The above should be:

[[✅:: ]YYYY-MM-DD[]]

From their docs: moment().format('YYYY [escaped] YYYY');

I use their escape syntax to construct the reverse regex to undo/remove appended text. Square braces surrounding text that is not part of the date format is key. :)

@wenlzhang
Copy link

I use their escape syntax to construct the reverse regex to undo/remove appended text. Square braces surrounding text that is not part of the date format is key. :)

Thanks for the help! It works now.

@ebullient
Copy link
Owner Author

I updated the README to clarify, too. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants