Formatting date javascript -



Formatting date javascript -

i'm using var datestring= new date(parseint(datestringunix)); , obtain string sun jun 10 2012 16:40:16 gmt+0200 (ora legale europa occidentale).

the question is: how can remove string part gmt+0200 (ora legale europa occidentale)?

like this:

datestring = datestring.tostring().replace(/ gmt.*/,"");

the above replaces space before gmt, , after gmt including gmt empyt string.

i've used .tostring() convert object string .replace() can used.

javascript

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -