-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Expose the useful constant values in TimeSpan #103498
Conversation
Note regarding the
|
1 similar comment
Note regarding the
|
Added the missing documentation blocks following the pattern of the single existing one from before. |
8a7333e
to
40d4350
Compare
src/libraries/System.Private.CoreLib/src/System/Globalization/Calendar.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/EventLogInternal.cs
Outdated
Show resolved
Hide resolved
Clean build now |
@IDisposable thanks for getting this ready. Let's wait resolve #103498 (review) and update the wrong doc remark, then we should be good to go. |
Make the useful constants that TimeSpan has internally declare public because they're rooted in hard reality and not changeable, and quite useful elsewhere. Update reference assembly and use the newly exposed values in all the places in Calendar and DateTime and related classes. Fixes dotnet#94545
Since this source is also built for older frameworks, leave the constant here.
Cast at call-site to prevent performance degradation.
cf9ba51
to
8683434
Compare
@IDisposable why did you force push the commits? |
I just rebased to current main (didn't know anyone had approved). There were no actual changes since the move back to casting to |
Thanks again @IDisposable for helping with this change. |
New PR to drop to |
Make the useful constants that
TimeSpan
declaredinternal
to now bepublic
because they're rooted in hard reality and not changeable, and quite useful elsewhere.Updated the reference assembly to include the new fields.
Updated the DateTime classes, Calendar classes, and other miscellaneous classes in runtime use the newly exposed values for the intervals.
Fixes #94545