Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
function getMondaysInSchoolYear($startYear, $endYear) { $mondays = array(); ..
Decoded Output download
<? function getMondaysInSchoolYear($startYear, $endYear) {
$mondays = array();
$startDate = new DateTime("$startYear-08-01"); // Assuming school year starts in August
$endDate = new DateTime("$endYear-07-31"); // Assuming school year ends in July
$interval = new DateInterval('P1W'); // 1 week interval
$currentDate = $startDate;
while ($currentDate <= $endDate) {
if ($currentDate->format('N') == 1) { // Check if it's a Monday (1 = Monday)
$mondays[] = $currentDate->format('Y-m-d');
}
$currentDate->add($interval);
}
return $mondays;
}
$startYear = 2023;
$endYear = 2024;
$mondays = getMondaysInSchoolYear($startYear, $endYear);
foreach ($mondays as $monday) {
echo $monday . "
";
}
?>
Did this file decode correctly?
Original Code
function getMondaysInSchoolYear($startYear, $endYear) {
$mondays = array();
$startDate = new DateTime("$startYear-08-01"); // Assuming school year starts in August
$endDate = new DateTime("$endYear-07-31"); // Assuming school year ends in July
$interval = new DateInterval('P1W'); // 1 week interval
$currentDate = $startDate;
while ($currentDate <= $endDate) {
if ($currentDate->format('N') == 1) { // Check if it's a Monday (1 = Monday)
$mondays[] = $currentDate->format('Y-m-d');
}
$currentDate->add($interval);
}
return $mondays;
}
$startYear = 2023;
$endYear = 2024;
$mondays = getMondaysInSchoolYear($startYear, $endYear);
foreach ($mondays as $monday) {
echo $monday . "\n";
}
Function Calls
getMondaysInSchoolYear | 1 |
Stats
MD5 | 8526a400329492fffc79ce04044612f1 |
Eval Count | 0 |
Decode Time | 47 ms |