(year)
| 21962 | } |
| 21963 | |
| 21964 | function getFirstThursdayOfYear(year) { |
| 21965 | // 0 = index of January |
| 21966 | var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay(); |
| 21967 | // 4 = index of Thursday (+1 to account for 1st = 5) |
| 21968 | // 11 = index of *next* Thursday (+1 account for 1st = 12) |
| 21969 | return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst); |
| 21970 | } |
| 21971 | |
| 21972 | function getThursdayThisWeek(datetime) { |
| 21973 | return new Date(datetime.getFullYear(), datetime.getMonth(), |
no outgoing calls
no test coverage detected