0

I would like to know how can we fetch the Last day of the current month using javascript. E.g. last day of January is Tuesday

1 Answer 1

1
var       today = new Date()
  , lastOfMonth = new Date( today.getFullYear(), today.getMonth()+1, 0 )
  ,   dayOfWeek = lastOfMonth.getDay();

dayOfWeek now = 0 for sunday... 6 for saturday

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.