Apr 07, 2011 — 0 comments
Ever wanted to display a date and not known how to get “th” after your 7 to make December 7th, 1941? Or wanted to show a visitor to a website that they were the 4,721st visitor and not visitor number 4,721?
This short how-to shows you how to format dates in PHP
How to get the start and end date of the prior week to the current one in PHP.
Learn the basics of the PHP Date Function with this quick, simple tutorial and cheat sheet!
In this tutorial we'll be going through the ins and outs on how to make a calendar in php.
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.
Dates can be hard to work with in PHP, here we learn you the simple way of getting yesterdays date (and other dates relative to today)
This tutorial walks you through how to use a few simple functions - strotime(), date(), and rand() - to find a random date in PHP. The end result is a simple one-line command, which you can place in a function and re-use in your own scripts.
Using the Timezone class to automatically deduce the timezone's GMT offset and then modify the date accordingly. I must admit that I was going to write you a simple timezone script and then tell you how easy it was. However, I came across some handy timezone_* functions and things got a little more difficult but a lot more practical. This script will allow you to display the time in any timezone you wish, without any ifs, buts or maybes along the way.
If you want to impose restrictions on age when people visit your website, or sign up, you'll need to calculate a user's age through a form - since web servers aren't psychic - yet.
Help us out! More and more tutorials are submitted to Good-Tutorials each day. We could use your help with finding good tutorials. Mind lending a hand?