Skip to content

Instantly share code, notes, and snippets.

@divinity76
Last active August 8, 2020 23:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save divinity76/859a69038b99564f3f1204993f071ea6 to your computer and use it in GitHub Desktop.
Save divinity76/859a69038b99564f3f1204993f071ea6 to your computer and use it in GitHub Desktop.
<?php
// Øns 01-Apr-2020
$start=new DateTime("2020-08-01");
$start->modify("-1 day");
$end=new DateTime("2020-09-01");
for(;;){
$start->modify("+1 day");
if($start>=$end){
break;
}
$d=$start->format("D d-M-Y");
$d=strtr($d,[
"Mon"=>"Man",
"Tue"=>"Tir",
"Wed"=>"Ons",
"Thu"=>"Tor",
"Fri"=>"Fre",
"Sat"=>"Lør",
"Sun"=>"Søn",
"Aug"=>"Aug"
]);
echo $d,"\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment