@ -65,10 +65,12 @@
const day = () => {
const today = () => {
const currentYear = new Date().getFullYear().toString();
const hasTimestamp = new Date() - new Date(currentYear);
const hasTimestamp = new Date() - new Date(currentYear) + (8*60*60*1000);
const hasDays = Math.ceil(hasTimestamp / 86400000);
return hasDays
}
console.log(new Date())
console.log(today())
const safe = (el) => {
const html = `
<span style="position: absolute;top: 66%;left: 84%;white-space:nowrap;color: #CBE6F7;font-size: 1.3vw;font-weight:600;transform: translateX(-50%);letter-spacing: 0.3vw">${new Date().getFullYear().toString()}年连续安全生产天数</span>