Projects/nettsiden-old
Projects
/
nettsiden-old
Archived
8
0
Fork 0

Fix bug with single digit dates

This commit is contained in:
Peder Bergebakken Sundt 2018-10-25 00:32:04 +02:00
parent c549890b7e
commit 39126936b0
1 changed files with 2 additions and 2 deletions

View File

@ -49,8 +49,8 @@ $date_part_start_time = $_POST['start_time'];
$date_part_lasts_hours = $_POST['lasts_hours'];
$date_part_lasts_minutes = $_POST['lasts_minutes'];
if (strlen($date_part_start_day) < 2) {
$date_part_start_day = "0";
while (strlen($date_part_start_day) < 2) {
$date_part_start_day = "0" . $date_part_start_day;
}
$start = ($date_part_start_mon . "-" . $date_part_start_day . " " . $date_part_start_time);