JavaScript获取当前月份的所在的季度

JavaScript获取季度

// 获取当前季度:
var currMonth= new Date().getMonth()+1;
var currQuarter = Math.floor( ( currMonth % 3 == 0 ? ( currMonth / 3 ) : ( currMonth / 3 + 1 ) ) );
原文地址:https://www.cnblogs.com/yeminglong/p/13710688.html