Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. var arr = " yyyy-mm-dd hh:mm:ss".split(/-|s|:/);// split string and create array.
  2. var date = new Date(arr[0], arr[1] -1, arr[2], arr[3], arr[4], arr[5]); // decrease month value by 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement