Skip to content

Instantly share code, notes, and snippets.

@marcorieser
Last active January 28, 2020 08:08
Show Gist options
  • Save marcorieser/fc21565a3e3513d24215d9978626b8bb to your computer and use it in GitHub Desktop.
Save marcorieser/fc21565a3e3513d24215d9978626b8bb to your computer and use it in GitHub Desktop.
<?php
$current_year = date("Y");
echo '<ul>';
for ($month = 1; $month <= 12; $month++) {
echo '<li>';
echo date("d.M.Y", strtotime("first monday of $current_year-$month") - 1);
echo '</li>';
}
echo '</ul>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment