(year)
| 16992 | } |
| 16993 | |
| 16994 | function getFirstThursdayOfYear(year) { |
| 16995 | // 0 = index of January |
| 16996 | var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay(); |
| 16997 | // 4 = index of Thursday (+1 to account for 1st = 5) |
| 16998 | // 11 = index of *next* Thursday (+1 account for 1st = 12) |
| 16999 | return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst); |
| 17000 | } |
| 17001 | |
| 17002 | function getThursdayThisWeek(datetime) { |
| 17003 | return new Date(datetime.getFullYear(), datetime.getMonth(), |
no outgoing calls
no test coverage detected