Contact: aviboots(AT)netvision.net.il
39,872 questions
51,796 answers
573 users
function getQuarterFromADate(date = new Date()) { return Math.floor(date.getMonth() / 3 + 1); } console.log(getQuarterFromADate(new Date('2023-07-14'))); /* run: 3 */