Windows Calculator: A simple yet powerful calculator that ships with Windows
Go to file
Rudy Huyn cd7c266a6b Fix issue with Date diff when it includes a Daylight Saving Time (#193)
The application uses local time to calculate the number of days between 2 dates. If a Daylight Saving Time takes place during this period of time (only Clocks Forward 2am->3am), the application will miss 1 day and fail to calculate the number of days/weeks/months between the 2 dates.
image

Description of the changes:
DateCalculationEngine uses local time to modify dates, however, AddDays, AddWeeks,... won't add 24 hours or 7 days if DST happens between the 2 dates, but instead add ~23.9/24.1 hours or ~6.9/7.1 days (depends if it's the DST clock backward or clock forward). When the DST is clock forward, DateCalculationEngine will miss one day.

Solution
use UTC dates to calculate date difference.

Extra Fix:
use calendar->FirstPeriodInThisDay and calendar->FirstHourInThisPeriod in ClipTime (else it will set the time to 12PM (noon) in some regions.
replace OBSERVABLE_PROPERTY_RW by OBSERVABLE_PROPERTY_R when possible.
remove the definition of CheckClipTimeSameDay (implementation missing)

How changes were validated:
Tested manually with different regions (FR, US, ES, JP).

Fixes #178
2019-03-18 11:22:32 -07:00
.github Documentation: revise the new feature process (#82) 2019-03-05 15:24:32 -08:00
build Switch CI builds to use public machine pool (#93) 2019-03-05 07:06:06 -08:00
docs Optimised images losslessly. (#229) 2019-03-13 16:37:50 -07:00
internal Remove invalid links from comments (#201) 2019-03-08 10:28:35 -08:00
src Fix issue with Date diff when it includes a Daylight Saving Time (#193) 2019-03-18 11:22:32 -07:00
Tools/PGO Hello GitHub 2019-01-28 16:24:37 -08:00
.editorconfig Remove duplicate .editorconfig. (#257) 2019-03-11 17:04:17 -07:00
.gitattributes Hello GitHub 2019-01-28 16:24:37 -08:00
.gitignore Clean up unit test projects (#4) 2019-01-29 19:37:37 -08:00
CODE_OF_CONDUCT.md Hello GitHub 2019-01-28 16:24:37 -08:00
CONTRIBUTING.md Switch urls from http: to https: (#137) 2019-03-07 08:56:25 -08:00
LICENSE Hello GitHub 2019-01-28 16:24:37 -08:00
NOTICE.txt Switch urls from http: to https: (#137) 2019-03-07 08:56:25 -08:00
nuget.config Hello GitHub 2019-01-28 16:24:37 -08:00
README.md Update punctuation in README.md (#205) 2019-03-08 23:18:41 -08:00

Calculator

The Windows Calculator app is a modern Windows app written in C++ that ships pre-installed with Windows. The app provides standard, scientific, and programmer calculator functionality, as well as a set of converters between various units of measurement and currencies.

Calculator ships regularly with new features and bug fixes. You can get the latest version of Calculator in the Microsoft Store.

Build Status

Calculator Screenshot

Features

  • Standard Calculator functionality which offers basic operations and evaluates commands immediately as they are entered.
  • Scientific Calculator functionality which offers expanded operations and evaluates commands using order of operations.
  • Programmer Calculator functionality which offers common mathematical operations for developers including conversion between common bases.
  • Calculation history and memory capabilities.
  • Conversion between many units of measurement.
  • Currency conversion based on data retrieved from Bing.

Getting started

Prerequisites:

  • Your computer must be running Windows 10, version 1803 or newer.

  • Install the latest version of Visual Studio (the free community edition is sufficient).

    • Install the "Universal Windows Platform Development" workload.
    • Install the optional "C++ Universal Windows Platform tools" component.
    • Install the latest Windows 10 SDK.

    Visual Studio Installation Screenshot

  • Install the XAML Styler Visual Studio extension.

  • Get the code:

    git clone https://github.com/Microsoft/calculator.git
    
  • Open src\Calculator.sln in Visual Studio to build and run the Calculator app.

  • For a general description of the Calculator project architecture see ApplicationArchitecture.md.

Contributing

Want to contribute? The team encourages community feedback and contributions. Please follow our contributing guidelines.

If Calculator is not working properly, please file a report in the Feedback Hub. We also welcome issues submitted on GitHub.

Roadmap

For information regarding Windows Calculator plans and release schedule, please see the Windows Calculator Roadmap.

Data / Telemetry

This project collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. Telemetry is disabled in development builds by default, and can be enabled with the SEND_TELEMETRY build flag.

Reporting Security Issues

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) at <secure@microsoft.com>. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License.