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

stdlib: Wrap C strptime function for parsing timestamps #61

Open
rsaarelm opened this issue Mar 15, 2024 · 1 comment
Open

stdlib: Wrap C strptime function for parsing timestamps #61

rsaarelm opened this issue Mar 15, 2024 · 1 comment

Comments

@rsaarelm
Copy link

rsaarelm commented Mar 15, 2024

Signature would be something like (ZonedTime | :else) strptime(string timestamp, string format)

Usage: "2024-03-15T12:15:01+0200".strptime("%Y-%m-%dT%H:%M:%S%z"). The timezone info carrying time type is needed too...

Also do strftime that goes the other way, internal time value to formatted string. string strftime(ZonedTime t, string format).

@FeepingCreature
Copy link
Contributor

FeepingCreature commented Mar 15, 2024

Like SysTime in D, std.time.Time should have a timezone field and support all the parser stuff.

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