Using date object in javascript, beginning to use jquery