ADBRITE ads links
You are here: CodeIdol.com > Php > PHP 5 in Practice > Time And Date
PHP 5 in Practice
| 3. Time and Date
Applications that deal with time are forever present, especially in web-based applications: times of form submittals, user input such as date of birth, and the updating and removal of pages when out of date are just a few ex...
|
|
| 3.1. Calculating the Difference Between Two Dates
Finding the number of weeks, days, or even seconds between two dates is something that programs regularly need to do. Often a database will have powerful built-in procedures for comparing dates and...
|
|
| 3.2. Determining Last Day of a Given Month
It is often useful to determine what the last day of a given month is. Although a lookup table could tell you what the actual day is (although you would have to still calculate February based on leap year...
|
|
| 3.3. Leap Year Calculation
A common task for which PHP does not have a built-in function is determining whether a certain year is a leap year. Although a simple formula determines this, many people forget parts of it. A year is only a leap year ...
|
|
| 3.4. Handling Time Zones
Handling time zones can be cumbersome. Fortunately, PHP provides many different solutions. Many of these rely on PHP 5.1's feature of using date_default_timezone_get() to specify the time zone you want calculations to take...
|
|
| 3.5. Handling Time Stamps Within Databases or in Files
Often you will be handed date markers within a data file. The format of these is beyond your control; however, you need to read them into PHP to handle as a date. You can parse the date into i...
|
|
| 3.6. Determining Number of Business Days
Although section 3.1, "Calculating the Difference Between Two Dates," showed how to determine the number of days between any two dates, that isn't helpful in the business world, which lives by bus...
|
|
| 3.7. Generating a Calendar for a Given Month
Dates are a common part of life, and calendars are part of that. People like to be able to visually look at a calendar to get a feeling for how one date relates to another. Because of this many applic...
|
|
You are here: CodeIdol.com > Php > PHP 5 in Practice > Time And Date
|
|
Related tags
Popular Categories
Unix books and guides
AJAX popular information
C# language guides
Windows books and cookbooks
.......
|
|