Dev Helpers
← Back

Derive the ISO week Monday

Derive the ISO week Monday using JavaScript.

Open this example in the interactive library

Source code

const d = new Date("2028-06-15T00:00Z");
d.setUTCDate(d.getUTCDate() - ((d.getUTCDay() + 6) % 7));
console.log(d.toISOString().slice(0, 10));

Sample output

2028-06-12