Calculator: Application fails to take float value for Currency converter when Japanese Calendar is enabled

Created on 3 Apr 2019  路  7Comments  路  Source: microsoft/calculator

A team member will update this issue with more details soon.

Bug 2 triage approved

Most helpful comment

I looked into this one a bit more. The reason that this happens is that when you change your Format to Japanese (Japan) the Currency Format changes by default to have 0 "No. of digits after decimal". This may or may not be correct, but Calculator is correctly using the format. I will follow up with the intl.cpl team form them to decide if the current intl.cpl behavior is correct or not.

All 7 comments

This is your friendly Microsoft Issue Bot. I created this issue automatically as requested by a team member.

Describe the bug

When you update your calendar settings to Japanese, Calculator's currency converter stops letting you input values after a decimal point.

Steps To Reproduce

  1. Open intl.cpl
  2. Select "Japanese (Japan)" from the "Format" drop down
  3. Select "Additional Settings" Date
  4. In the "Calendar Type" dropdown, select the 2nd calendar "鍜屾殾", which is the Japanese
  5. Select "Apply" and 鈥淥k" buttons.
  6. Launch Calculator
  7. From menu, select currency convertor
  8. Type in digits, then a decimal point, then type in more digits

Expected behavior

The additional digits should get used as part of the number, but don't.

Device and Application Information (please complete the following information):

OS Build: 10.0.18362.0
Architecture: X64
Application Version: 10.1902.42.0

I looked into this one a bit more. The reason that this happens is that when you change your Format to Japanese (Japan) the Currency Format changes by default to have 0 "No. of digits after decimal". This may or may not be correct, but Calculator is correctly using the format. I will follow up with the intl.cpl team form them to decide if the current intl.cpl behavior is correct or not.

This issue showcases a wider issue.

The Currency Format dialog gives information about the locale currency, not all currencies.

When you use Japanese yens, the lower coin is 1 yen, cents don't exist, so it seems normal that the number of digits after decimal equals 0 when the region is Japan. But should we use this settings for all other currencies? Probably not.

When we convert Yen in Dollar, should we display: 25 Yen == 0 Dollar or 25 Yen == 0.22 Dollar?
Because Yen doesn't feature cents, should we allow users to write "212.40 Yens" when this value doesn't exist?

Similarly, if a US user wants to know how many dollars his/her Kuwaiti dinars are worth, we should probably allow him/her to type 12.005 Dinar (because the currency includes millesimal)

We should probably associate a number of decimals to each currency and use these values instead of Windows settings for the currency converter.

The number of decimals for each currency is defined in ISO-4217, we can hard-code the list of currencies not using 2 decimals (because a very large majority of currencies use 2) and use it for Currency Converter.

@Geveffe @grochocki , let me know if I should create another issue or if we can reopen/rename this one in order to debate about this idea.

Thanks for digging into this @rudyhuyn. We should definitley handle the variations between currencies. As you point out, there is some nuance here for handling conversions (e.g., Yen/Dollar), so lets create a new issue to discuss further.

Issue reopened by #1204.

Was this page helpful?
0 / 5 - 0 ratings