How to convert ruby time to javascript time and vice versa?
Ruby on rails :
Time.now
Javascript :
new Date()
Use strftime to get miliseconds:
And parse back to Ruby using to_date:
params[:date].to_date
to_date accepts few formats:
'3-2-2001' '03/02/2001' '2001-02-03' '3rd Feb 2001' '20010203'