In php we can get the last date of a month by formatting it as ('Y-m-t')
. If we format 2017-01-01 as ('Y-m-t') it gives 2017-01-31. Is there a way to do this from javascript? How can I get the last date of the given month. My input is 'Jan-2017'. How can I format this into 2017-01-31?
Asked
Active
Viewed 67 times
1

i am batman
- 581
- 3
- 6
- 21
-
1Check this out https://stackoverflow.com/questions/1184334/get-number-days-in-a-specified-month-using-javascript – Praveen M P Jul 14 '17 at 03:24