lostintangent / gitdoc

VS Code extension that allows you to edit a Git repo, like it's a multi-file, versioned document.
https://aka.ms/gitdoc
MIT License
267 stars 24 forks source link

gitdoc.commitMessageFormat not respecting custom format #47

Open caseyg-ronin opened 2 years ago

caseyg-ronin commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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