匹配报告期解析
程序员文章站
2022-03-13 09:58:24
function matchreport(report) {
var themouth = new date(report).getmonth() + 1;
theyear =...
function matchreport(report) {
var themouth = new date(report).getmonth() + 1;
theyear = report.split("-")[0];
switch (themouth) {
case 3:
return theyear + "一季报";
case 6:
return theyear + "中报";
case 9:
return theyear + "三季报";
case 12:
return theyear + "年报";
default:
return report;
}
}
上一篇: 如何优雅的全屏