Get current fiscal year
HTML
Current Financial Year :-<span id='spFY'></span>
JavaScript
function getCurrentFinancialYear() {
var fiscalyear = "";
var today = new Date();
if ((today.getMonth() + 1) <= 3) {
fiscalyear = (today.getFullYear() - 1) + "-" + today.getFullYear()
} else {
fiscalyear = today.getFullYear() + "-" + (today.getFullYear() + 1)
}
return fiscalyear
}
document.getElementById("spFY").innerHTML=getCurrentFinancialYear();