(year)
| 18644 | } |
| 18645 | |
| 18646 | function getFirstThursdayOfYear(year) { |
| 18647 | // 0 = index of January |
| 18648 | var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay(); |
| 18649 | // 4 = index of Thursday (+1 to account for 1st = 5) |
| 18650 | // 11 = index of *next* Thursday (+1 account for 1st = 12) |
| 18651 | return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst); |
| 18652 | } |
| 18653 | |
| 18654 | function getThursdayThisWeek(datetime) { |
| 18655 | return new Date(datetime.getFullYear(), datetime.getMonth(), |
no outgoing calls
no test coverage detected