js 获取当年到今日的时间区间
$scope.InitDate = function() {
var now = new Date();
var currentYear = now.getFullYear();
var currentMonth = now.getMonth()+1;
var currentDay = now.getDate();
var dayRgFrom = currentYear + "-01-01";
$scope.queryBean.dayFrom = dayRgFrom;
var dayRgTo = currentYear + "-";
if(currentMonth < 10) {
dayRgTo +="0";
}
dayRgTo += currentMonth + "-";
if(currentDay < 10) {
dayRgTo += "0";
}
dayRgTo += currentDay;
$scope.queryBean.dayTo = dayRgTo;
}