When developing more complex PHP sites, especially forums, discussion boards and blogs where date and time functions are important, you’ll regularly encounter situations where you need to display and manipulate values based around the current date and time. PHP includes a range of functions which can help you to easily format and adjust your date and time displays to suit your needs. In this tutorial, we’ll look at some easy ways to display calendar information for your visitors.
In this tutorial you will learn from a simple code how to generate the page loading time using pure PHP programing.
The idea is simple, this script generates a number that counts in seconds the page loading time.
It’s a very simple script and is accurate to 0.000000000000001 seconds.
This incredibly simple code will take a date and work out the number of days until that date, it can also be displayed as seconds, hours, weeks, months, days .etc. Learn how it works and find out about three PHP functions.
With PHP's date function you format timestamps, so they are more human readable. The following tutorial will teach you how to display the current time, formating PHP's time stamp, and show you all the various date arguments for reference purposes.
Many registration forms request registrants' birth dates. This function allows you to use that information to determine a person's age. This is useful when determining whether COPPA requires parental consent (if the user is under 13).
Ever wondered how to calculate the number of days between two dates using PHP. Well, by following this very detailed article you will learn in no time.