Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Your Email:

A Class for Validating and Formatting Dates

By Tony Marston
2005-04-16


A Class for Validating and Formatting Dates

Intended Audience This tutorial is intended for developers who want to take a user-supplied date and format it so that it can be added to the database, and then to take a date from the database and format for display to the user.

Prerequisites
It is assumed you have basic knowledge of PHP. This tutorial will cover some of the following areas in PHP:

• Class/Object functions.

• Simple Array functions.

• Simple regular expressions.

• Date functions (checkdate, GregoriantoJD, JDtoGregorian).

• String functions (strtolower, ucfirst, strlen, substr, list, split).

Tutorial Pages:
» A Class for Validating and Formatting Dates
» Defining the Class to Handle Dates
» Display date to the User
» Incrementing or Decrementing a Date
» Using this Class in Your Code
» Summary


 | Bookmark
Related Tutorials:
» Port Scanning and Service Status Checking in PHP
» Web Database Access from Desktop Applications
» CubeCart 3.0 Installation and Configuration
» PHP Site Search Made Easy
» Installing and Configuring Drupal 6.1
» Desktop Application Development with PHP-GTK