File: fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch06_Dates/mktime.php

Recommend this page to a friend!
  Classes of Slavko Srakocic  >  B12 PHP FW  >  fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch06_Dates/mktime.php  >  Download  
File: fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch06_Dates/mktime.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: B12 PHP FW
Manage database records with a PDO CRUD interface
Author: By
Last change:
Date: 1 month ago
Size: 514 bytes
 

Contents

Class file image Download
<?php
$first_of_this_month
= mktime(0, 0, 0, intval(date("m")), 1);

$next_month_timestamp = strtotime("+1 month");

$first_of_next_month = mktime(0, 0, 0, intval(date("m", $next_month_timestamp)), 1, intval(date("y", $next_month_timestamp)));

print
date("Y-m-d h:i:sa", $first_of_this_month) . "\n";
print
date("Y-m-d h:i:sa", $next_month_timestamp) . "\n";
print
date("Y-m-d h:i:sa", $first_of_next_month) . "\n";

print
date("Y-m-d h:i:s", $first_of_next_month) . "\n";
print
date("Y-m-d H:i:s") . "\n";

?>

For more information send a message to info at phpclasses dot org.