project-libs
Version:
project-libs 是一个常用函数集锦的工具库,包括浏览器、函数式、常用验证、cookie、数组处理等函数。
18 lines (17 loc) • 453 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = getDay;
/**
* 获取某一天
* @param fill {boolean} 布尔值,是否补 0,默认为 true
* @returns {number | string} 返回哪一天
*/
function getDay(fill) {
if (fill === void 0) { fill = true; }
var day = new Date().getDate();
var _day = day;
if (fill) {
_day = day < 10 ? "0".concat(day) : day;
}
return _day;
}
;