I am facing this weird problem were the default date time format for javascript object has changed from “dd/mm/yyyy” to “mm/dd/yyyy”….due to this I am getting many invalid dates,
This is only restricted to one machine,(which I surely doubt someone messed up the system date or something as I am not the only one using the machine),
I know the problem is only confided to the machine ,but I want to find the reason why this happened and how I can solve this
There is some information missing here. The standard Date object does not understand DMY-formatted dates or MDY-formatted dates. Instead it uses the ISO 8601 format (or RFC2822) for dates. So, for example, if a particular browser understands
as May 5, 2012 or as 5 June, 2012, or ignores it completely, it’s entirely browser dependent. The standard expects a date formatted in the form "YYYY-MM-DD" and so on.
Also the parameter in
is being interpreted as 5 divided by 6 divided by 2012, which is a small number just greater than zero. This is interpreted as a time on the base day, viz 1 January, 1970.
So, for the base system’s regional settings to have an influence, there must be some other code somewhere that formats dates as DMY or MDY or something else.