To list available contexts: kubectl config get-contexts To show the current context: kubectl config current-context…
Getting the Last Monday for Any Month with TypeScript/JavaScript
TypeScript/JavaScript
function getLastMonday(d: Date) {
let d1 = new Date(d.getFullYear(), d.getMonth() + 1, 0);
let wd = d1.getDay();
d1.setDate(d1.getDate() - (wd < 1 ? 6 : wd - 1));
return d1;
}
This Post Has 0 Comments