You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see a %f microsecond modifier was added in 720f6bf.
I would like to suggest possibly documenting this in the readme and Go documentation.
The readme currently mentions the glibc extensions, and both the readme and g docs link to https://linux.die.net/man/3/strftime for full formatter documentation. As far as I can tell though, it appears %f is not included in those glibc strftime extensions?
From what I can tell via web searches, it may come from the python datetime library, which in its documentation points at the C89 reference ("The following is a list of all the format codes that the 1989 C standard requires, and these work on all platforms with a standard C implementation"). However, the %f format specifier does not appear to actually appear in the C standard, even after the C99 extensions: https://en.cppreference.com/w/c/chrono/strftime. I can't find a reference to it in any other strftime implementation outside of Python, so I guess that may be where it originated?
Either way, it's useful, but I only found it via the source code, so I'd recommend documenting it for posterity. (I can make a PR if you prefer, but not sure how you would like to explain it in the docs.)
The text was updated successfully, but these errors were encountered:
Thanks for reporting. The original intention was to support microseconds in gojq, after seeing jqlang/jq#1409. Also I looked imperfectgo/go-strftime which supports this directive, but I failed investigate its origin. Though this library was intended not to include an extension like this, but %f is already used by the dependants, so hardly to drop support. I'll add a note in README.md.
I see a
%f
microsecond modifier was added in 720f6bf.I would like to suggest possibly documenting this in the readme and Go documentation.
The readme currently mentions the glibc extensions, and both the readme and g docs link to https://linux.die.net/man/3/strftime for full formatter documentation. As far as I can tell though, it appears
%f
is not included in those glibc strftime extensions?From what I can tell via web searches, it may come from the python datetime library, which in its documentation points at the C89 reference ("The following is a list of all the format codes that the 1989 C standard requires, and these work on all platforms with a standard C implementation"). However, the
%f
format specifier does not appear to actually appear in the C standard, even after the C99 extensions: https://en.cppreference.com/w/c/chrono/strftime. I can't find a reference to it in any other strftime implementation outside of Python, so I guess that may be where it originated?Either way, it's useful, but I only found it via the source code, so I'd recommend documenting it for posterity. (I can make a PR if you prefer, but not sure how you would like to explain it in the docs.)
The text was updated successfully, but these errors were encountered: