-
Notifications
You must be signed in to change notification settings - Fork 230
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
2020 is a leapyear #86
Comments
There already is SystemTimeToFileTime and the reverse for conversion
between the two.
…On Tue, Aug 20, 2019, 12:52 Matt Gradwohl ***@***.***> wrote:
2020 is a leap year and there are lot of times developers do things like
manipulate SYSTEMTIME or FILETIME or convert from one to another, and they
do not take into account leap years. C# has AddYears()
<https://docs.microsoft.com/en-us/dotnet/api/system.datetime.addyears?view=netframework-4.8>
for this.
WIL should implement safe date manipulation methods like C# so that 2020
isn't a mess.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#86?email_source=notifications&email_token=ABRELNU4GBE4S7XSI5ZPMLTQFQOMLA5CNFSM4INZ6QEKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HGJSYDA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABRELNWW34HGSSYNXLWQBGLQFQOMLANCNFSM4INZ6QEA>
.
|
SystemTimeToFileTime and the reverse for conversion actually causes problems, this is exactly why .net has AddYears(). |
@ShawnSteele - are there Windows platform APIs to manipulating times like the .NET versions? This - standard APIs for manipulating times - might be a good fit for http://github.com/microsoft/projectreunion |
And 2 years later we have C++20's |
I'm going to close this for now since we support WinAppSDK might still be a reasonable place to put language-agnostic date manipulation methods based on the WinRT |
2020 is a leap year and there are lot of times developers do things like manipulate SYSTEMTIME or FILETIME or convert from one to another, and they do not take into account leap years. C# has AddYears() for this.
WIL should implement safe date manipulation methods like C# so that 2020 isn't a mess.
The text was updated successfully, but these errors were encountered: