gitdoc icon indicating copy to clipboard operation
gitdoc copied to clipboard

gitdoc.commitMessageFormat not respecting custom format

Open caseyg-ronin opened this issue 3 years ago • 2 comments

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!

caseyg-ronin avatar Aug 24 '22 21:08 caseyg-ronin

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.

rongxin-liu avatar Aug 24 '22 22:08 rongxin-liu

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

caseyg-ronin avatar Aug 24 '22 23:08 caseyg-ronin