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

gitdoc.commitMessageFormat not respecting custom format #47

Open
caseyg-ronin opened this issue Aug 24, 2022 · 2 comments
Open

gitdoc.commitMessageFormat not respecting custom format #47

caseyg-ronin opened this issue Aug 24, 2022 · 2 comments

Comments

@caseyg-ronin
Copy link

caseyg-ronin commented Aug 24, 2022

Forgive me if this is a failing in my understanding of the config or moment.js, but I attempted to set my settings.json up like so:

{
    "gitdoc.enabled": true,
    "gitdoc.commitMessageFormat": "YYYY-MM-DDTHH:mm:ssZ"
}

And received a commit message like this:

YYYY-08-Aug 24, 202213:2913:29:42-7

Even the simple case of "gitdoc.commitMessageFormat": "YYYY" or "gitdoc.commitMessageFormat": "ISO_8601" don't show up as expected -- they produce commit messages of YYYY and I106O_8601 respectively.

Am I doing something wrong here or is there actually an issue?

[edit] FWIW, I was using this document as my source of formatting: https://momentjs.com/docs/#/parsing/string-format/

Thanks!

@rongxin-liu
Copy link
Contributor

rongxin-liu commented Aug 24, 2022

Hi, you might want to take a look at #45. You would want to use ccc, LLL d, kkkk, h:mm a ZZ instead of ddd, MMM D, YYYY, h:mm A Z per https://github.com/moment/luxon/blob/master/docs/formatting.md#table-of-tokens.

@caseyg-ronin
Copy link
Author

Ahhh, thanks! I think this issue could be switched over to updating the readme to reference luxon then. Specifically here

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

No branches or pull requests

2 participants