Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
/* let's mock MySQL DATETIME format */
$startdate = date("Y-m-d H:i:s");
/* start date converted */
$str_date_start = strtotime($startdate);
/* one year from start date */
$str_date_end = strtotime($startdate) + (60 * 60 * 24 * 365);
/* one day from start date */
$str_date_tomorrow = strtotime($startdate) + (60 * 60 * 24);
/* today */
$mystartdate_array = getdate($str_date_start);
echo "Start Date: ";
echo $mystartdate_array[weekday].", ";
echo $mystartdate_array[month]." ";
echo $mystartdate_array[mday].", ";
echo $mystartdate_array[year]." - ";
echo $mystartdate_array[mon]."/".$mystartdate_array[mday]."/".$mystartdate_array[year]." ";
echo $mystartdate_array[hours].":".$mystartdate_array[minutes].":".$mystartdate_array[seconds]."<br>";
/* tomorrow */
$mytomorrowdate_array = getdate($str_date_tomorrow);
echo "Tomorrow's Date: ";
echo $mytomorrowdate_array[weekday].", ";
echo $mytomorrowdate_array[month]." ";
echo $mytomorrowdate_array[mday].", ";
echo $mytomorrowdate_array[year]." - ";
echo $mytomorrowdate_array[mon]."/".$mytomorrowdate_array[mday]."/".$mytomorrowdate_array[year]." ";
echo $mytomorrowdate_array[hours].":".$mytomorrowdate_array[minutes].":".$mytomorrowdate_array[seconds]."<br>";
/* one year from now */
$myenddate_array = getdate($str_date_end);
echo "End Date: ";
echo $myenddate_array[weekday].", ";
echo $myenddate_array[month]." ";
echo $myenddate_array[mday].", ";
echo $myenddate_array[year]." - ";
echo $myenddate_array[mon]."/".$myenddate_array[mday]."/".$myenddate_array[year]." ";
echo $myenddate_array[hours].":".$myenddate_array[minutes].":".$myenddate_array[seconds]."<br>";
create table dateadd(date datetime not null default '0000-00-00 00:00:00');
INSERT INTO dateadd VALUES (NOW());
SELECT `date` as `start`,
DATE_ADD(`date`,INTERVAL 1 DAY) as `tomorrow`,
DATE_ADD(`date`,INTERVAL 1 YEAR) as `end` FROM `dateadd` WHERE 1
start tomorrow end
2001-09-04 02:54:21 2001-09-05 02:54:21 2002-09-04 02:54:21