windows - Javascript date time format on my machine has changed and I can't change it back -


i facing weird problem default date time format javascript object has changed "dd/mm/yyyy" "mm/dd/yyyy"....due getting many invalid dates,

this restricted 1 machine,(which surely doubt messed system date or not 1 using machine),

i know problem confided machine ,but want find reason why happened , how can solve this

there information missing here. standard date object not understand dmy-formatted dates or mdy-formatted dates. instead uses iso 8601 format (or rfc2822) dates. so, example, if particular browser understands

var d = new date("5/6/2012"); 

as may 5, 2012 or 5 june, 2012, or ignores completely, it's entirely browser dependent. standard expects date formatted in form "yyyy-mm-dd" , on.

also parameter in

var d = new date(5/6/2012); 

is being interpreted 5 divided 6 divided 2012, small number greater zero. interpreted time on base day, viz 1 january, 1970.

so, base system's regional settings have influence, there must other code somewhere formats dates dmy or mdy or else.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -