993
edições
(Criou página com '<script> document.addEventListener('DOMContentLoaded', function () { Date.prototype.getWeekNumber = function () { let d = new Date(Date.UTC(this.getFullYear(), this.getMonth(), this.getDate())); let dayNum = d.getUTCDay() || 7; d.setUTCDate(d.getUTCDate() + 4 - dayNum); let yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1)); return Math.ceil((((d - yearStart) / 86400000) + 1) / 7) }; const url = window.location.origin; const actualWeekN...') |
Sem resumo de edição Etiqueta: Revertido |
||
Linha 3: | Linha 3: | ||
Date.prototype.getWeekNumber = function () { | Date.prototype.getWeekNumber = function () { | ||
let d = new Date(Date.UTC(this.getFullYear(), this.getMonth(), this.getDate())); | let d = new Date(Date.UTC(this.getFullYear(), this.getMonth(), this.getDate())); | ||
d.setHours(d.getHours() - 7.3); | |||
let dayNum = d.getUTCDay() || 7; | let dayNum = d.getUTCDay() || 7; | ||
d.setUTCDate(d.getUTCDate() + 4 - dayNum); | d.setUTCDate(d.getUTCDate() + 4 - dayNum); |