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