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

Improve TimeOnly's example value #6

Merged
merged 6 commits into from
Apr 6, 2022
Merged

Improve TimeOnly's example value #6

merged 6 commits into from
Apr 6, 2022

Conversation

tinohager
Copy link
Contributor

@tinohager tinohager commented Apr 5, 2022

Hello thank you for the package. I noticed another small thing with the TimeOnly example - it doesn't contain milliseconds
image

While server response does:
image

My suggestion would be as follows, the example time is from this documentation
https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings#Roundtrip
image

@maxkoshevoi
Copy link
Owner

Hi, thanks for the contribution! Could you please clarify the issue? Are you saying that example value doesn't have .0000000 at the end, and thus doesn't fully represent the TimeOnly type?

@tinohager
Copy link
Contributor Author

Hi, thanks for the contribution! Could you please clarify the issue? Are you saying that example value doesn't have .0000000 at the end, and thus doesn't fully represent the TimeOnly type?

I have not found any information on how exactly the time format is defined. I have only adapted it to the return value.

@maxkoshevoi
Copy link
Owner

I have not found any information on how exactly the time format is defined. I have only adapted it to the return value.

Got it. What about https://docs.microsoft.com/en-us/dotnet/api/system.timeonly ?

Represents a time of day, as would be read from a clock, within the range 00:00:00 to 23:59:59.9999999

@tinohager
Copy link
Contributor Author

That would fit for example or?

@maxkoshevoi
Copy link
Owner

  • Do you know how American time format is handled (AM/PM)? Or does TimeOnly support only 24-hour-format? Does serviver return different results for different locales?
  • Could you replace 30 minutes with 42? I like the 42 reference 😅

@tinohager
Copy link
Contributor Author

tinohager commented Apr 5, 2022 via email

@maxkoshevoi
Copy link
Owner

maxkoshevoi commented Apr 6, 2022

What is a sample value for TimeSpan? Seems like it should be similar to TimeOnly

@tinohager
Copy link
Contributor Author

tinohager commented Apr 6, 2022

dotnet/runtime#53539

TimeOnly "HH':'mm':'ss[FFFFFFF]" ISO 8601: Time without UTC offset information

@maxkoshevoi
Copy link
Owner

I have no doubts regarding TimeOnly, and agree that sample should represent full format. But in the article you mentioned above there's a good point that TimeOnly is pretty similar to TimeSpan. So I was wondering, how does it's (TimeSpan's) sample value looks like.
I'm quite busy right now, so cannot check myself.

@maxkoshevoi maxkoshevoi changed the title Optimize TimeOnly example Improve TimeOnly's example value Apr 6, 2022
Copy link
Owner

@maxkoshevoi maxkoshevoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like TimeSpan doesn't have a sample value. LGTM then, thanks for the contribution!

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

Successfully merging this pull request may close these issues.

2 participants