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

[Feature] Parse fractional nanoseconds of various widths #261

Closed
mehcode opened this issue May 16, 2020 · 2 comments
Closed

[Feature] Parse fractional nanoseconds of various widths #261

mehcode opened this issue May 16, 2020 · 2 comments
Assignees
Labels
A-formatting Area: formatting A-parsing Area: parsing C-feature-request Category: a new feature (not already implemented)
Milestone

Comments

@mehcode
Copy link

mehcode commented May 16, 2020

I (unfortunately) have a large amount of textual timestamps that look like the following. The key issue is a variable (3, 6, or 9) digits after the point. I believe Java formats timestamps like this by default.

2020-05-12T23_41_10.061774001Z
2020-05-12T23_40_45.010569Z
2020-05-12T23_40_40.321Z

I can't figure out how to parse that with the format codes for time.

In chrono, the format code is:

%Y-%m-%dT%H_%M_%S%.fZ

@jhpratt
Copy link
Member

jhpratt commented May 16, 2020

This is planned as part of #236.

Right now, it's too tedious to support nine different modifiers, especially because it's specific to the nanoseconds specifier. With the various changes I'm planning, there will be completely separate specifiers for each modifier, rather than storing it alongside.

@jhpratt jhpratt added the C-feature-request Category: a new feature (not already implemented) label May 16, 2020
@mehcode
Copy link
Author

mehcode commented May 16, 2020

👍 Left some thoughts there. Thanks for the great work you've done on reviving this library.

@mehcode mehcode closed this as completed May 16, 2020
@mehcode mehcode reopened this May 16, 2020
@jhpratt jhpratt added A-formatting Area: formatting A-parsing Area: parsing labels May 16, 2020
@jhpratt jhpratt added this to the v0.3 milestone Jan 19, 2021
@jhpratt jhpratt self-assigned this Jan 19, 2021
@jhpratt jhpratt closed this as completed Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-formatting Area: formatting A-parsing Area: parsing C-feature-request Category: a new feature (not already implemented)
Projects
None yet
Development

No branches or pull requests

2 participants