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

Fix example with Year() in README #30

Open
daniel-jann opened this issue Jul 7, 2022 · 2 comments
Open

Fix example with Year() in README #30

daniel-jann opened this issue Jul 7, 2022 · 2 comments

Comments

@daniel-jann
Copy link

daniel-jann commented Jul 7, 2022

The example for the DATEPART Support in the README is using the extension method Year() but this is actually a native Property.

@daniel-jann
Copy link
Author

I just found out that actually the Year is supported as native, not extension method. I missed the fact that some were supported as native instead of extension methods. I'll change this issue to actually fix the documentation instead.

@daniel-jann daniel-jann changed the title Add Year() support (and others that the README says is supported) Fix example with Year() in README Jul 7, 2022
@StevenRasmussen
Copy link
Owner

@daniel-jann - The example in the docs refers to an Instant which does not have a property called Year and so it is exposed via an extension method. That being said, there’s no way to look at the documentation to know which NodaTime type is being referred to and so the documentation could be improved in this aspect. Maybe a table displaying each supported NodaTime type and whether the part is supported by a native property or an extension method might be a better approach?

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