(year)
| 19303 | } |
| 19304 | |
| 19305 | function getFirstThursdayOfYear(year) { |
| 19306 | // 0 = index of January |
| 19307 | var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay(); |
| 19308 | // 4 = index of Thursday (+1 to account for 1st = 5) |
| 19309 | // 11 = index of *next* Thursday (+1 account for 1st = 12) |
| 19310 | return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst); |
| 19311 | } |
| 19312 | |
| 19313 | function getThursdayThisWeek(datetime) { |
| 19314 | return new Date(datetime.getFullYear(), datetime.getMonth(), |
no outgoing calls
no test coverage detected