Dates and Time Concepts
Create Date
DateTimeImmutable represents a date or time without changing the original object.
Create Date
create_date.php
<?php
$day = ;
$date = new DateTimeImmutable($day, new DateTimeZone("UTC"));
$label = $date->format("Y-m-d");
echo "day=" . $day . "\n";
echo "label=" . $label . "\n";
<?php
$day = ;
$date = new DateTimeImmutable($day, new DateTimeZone("UTC"));
$label = $date->format("Y-m-d");
echo "day=" . $day . "\n";
echo "label=" . $label . "\n";
<?php
$day = ;
$date = new DateTimeImmutable($day, new DateTimeZone("UTC"));
$label = $date->format("Y-m-d");
echo "day=" . $day . "\n";
echo "label=" . $label . "\n";
fixed date
Use fixed input dates in examples so replay is deterministic.