79473101

Date: 2025-02-27 15:14:02
Score: 1
Natty:
Report link

function my_day_of_week($epoch){ $day = date('N', $epoch);

if ($day >= 1 and $day <=7) {
    return 1;
}
if ($day >= 8 and $day <=14) {
    return 2;
}
if ($day >= 15 and $day <=21) {
    return 3;
}
if ($day >= 21 and $day <=28) {
    return 4;
}
if ($day >= 29 and $day <=31) {
    return 5;
}

}

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Christian Maculus