Changed the way that we define end dates.

This commit is contained in:
2025-07-03 20:53:33 +10:00
parent 168a8806cf
commit bc02b448a4
5 changed files with 67 additions and 4 deletions

View File

@@ -10,6 +10,11 @@ function getEvents() {
$dt = new DateTime( $entry["start"] );
$ctl = $dt -> format("YmdHi");
$entries[$i]["ctl"] = $ctl;
$start = new DateTime($entries[$i]["start"]);
$end = new DateTime($entries[$i]["end"]);
$delta = $start->diff($end);
$hours = $delta -> days * 24 + $delta -> h + $delta -> i / 60 + $delta -> s / 3600;
$entries[$i]["hours"] = $hours;
$datestamp = $dt -> format("Ymd");
$files = array( "agenda" => sprintf("dat/agenda/%d.md", $datestamp)
, "minutes" => sprintf("dat/minutes/%d.md", $datestamp)