Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. var abc='2222-12-12'
  2. var date1 = new Date(abc)
  3. console.log("date1",date1); // "date1" Thu Dec 12 2222 05:30:00 GMT+0530 (India Standard Time)
  4.  
  5.  
  6. var abc='22222-12-12'
  7. var date2 = new Date(abc)
  8. console.log("date2",date2); //"date2" Thu Dec 12 22222 00:00:00 GMT+0530 (India Standard Time)
  9.  
  10.  
  11. var abc='22222-12-12'
  12. var date3 = new Date(abc)
  13. console.log("date3",date3.getUTCDate(abc)); //"date3" 11
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement