Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- how to get first day and last day of the week number and year
- For example if i give the input like 2(week),2012 it should return the values
- 2012-01-08 and 2012-01-14
- var year = 2012;
- var week = 2;
- var d = new Date("Jan 01, "+year+" 01:00:00");
- var w = d.getTime() + 604800000 * (week-1);
- var n1 = new Date(w);
- var n2 = new Date(w + 518400000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement