wsick / Fayde

Inspired by Silverlight; XAML engine using Javascript and rendering to the HTML5 Canvas.
MIT License
189 stars 27 forks source link

DateTime.toString("Y") not consistent with C# #132

Closed Sally-Xu closed 9 years ago

Sally-Xu commented 9 years ago

When using "Y" format, DateTime.toString("Y") returns "Month, Year".

Silverlight or C# in general returns "Month Year" (without comma).

BSick7 commented 9 years ago

I get this from Fayde which is identical to Silverlight.

Fayde screenshot

Silverlight screenshot2

Sally-Xu commented 9 years ago

This is what I got from Silverlight: sl

BSick7 commented 9 years ago

Which version of silverlight

Sally-Xu commented 9 years ago

I'm on Silverlight 5. I've also tested in non Silverlight project (like a simple C# UnitTest project). Both return without comma.

Sally-Xu commented 9 years ago

Do you see the comma in your window's calendar header bar? Or if you put a Silverlight calendar control in the page, do you see "June 2015" or "June, 2015"?

BSick7 commented 9 years ago

Ooh. You could be using a different culture. What are your culture settings?

Sally-Xu commented 9 years ago

default US.

BSick7 commented 9 years ago

Based on msdn: https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#YearMonth.

Sally-Xu commented 9 years ago

Now I think difference is between Win8 and Win7. Are you on windows 7? The calendar (or the same silverlight code) on my windows 7 machine output "June, 2015".

BSick7 commented 9 years ago

I am going to close this for now. As of now, the code is consistent with MSDN. We also don't want to be held hostage by .NET. Replicating .NET environmental differences is caustic to future development.