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

Parse day of the week #40

Open
slaterx opened this issue May 18, 2020 · 0 comments
Open

Parse day of the week #40

slaterx opened this issue May 18, 2020 · 0 comments

Comments

@slaterx
Copy link

slaterx commented May 18, 2020

Given the following time object:

time.Now() // 2013-11-18 17:51:49.123456789 Mon

How can I return the day, either as a ISOWeek (Monday) or as an int?

Also, considering the opposite:

now.Parse(1) // 2013-11-18 00:00:00.000000000 Mon
now.Parse("Monday") // 2013-11-18 00:00:00.000000000 Mon

How can I provide a day of the week (either Mon or 1) and time (Hour:Minute) to parse the full Time object? Like:

now.Parse("Monday", "12:34") // 2013-11-18 12:34:00.000000000 Mon

I tried to read the code (and the test cases) to see if there was a low hanging fruit expecting a PR but no luck... I'm happy to create a PR if given the direction of what's missing in the code.

Thanks,
Gleidson

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

1 participant