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
DateBuilder that allows DateOnly building too #2279
base: develop
Are you sure you want to change the base?
Conversation
Qodana for .NET4 new problems were found
💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at qodana-support@jetbrains.com
|
@Corniel I like this :) Although I would suggest to drop the public static DateTimeOffset WithOffset(this DateTime self, TimeSpan offset) => new(self, offset);
public static DateTimeOffset WithOffset(this DateBuilder self, TimeSpan offset) => new(self, offset);
public static DateTimeOffset AsOffset(this DateTime self) => new(self, 0.Hours());
public static DateTimeOffset AsOffset(this DateBuilder self) => new(self, 0.Hours()); This will address #2234 (comment) |
Why define the offset methods as extensions on the date builder? It's only purpose is just to do things like that?! |
Because it shouldn't matter if you call Now this is not possible, because Do you see my point? |
@IT-VBFK: I ment, that |
As illustration of the discussion in #2234