Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Rob Allen's Blog:
Validating dates
Nov 09, 2010 @ 12:11:12

In a new Zend Framework related post to his blog today Rob Allen takes a look at a different operating mode he found with Zend_Date changing how it handles format specifiers.

I discovered recently that Zend Framework 1's Zend_Date has two operating modes when it comes to format specifiers: iso and php, where iso is the default. When using Zend_Validate_Date in forms, I like to use the php format specifiers as they are what I'm used to and so can easily know what they mean when reviewing code that I wrote months ago.

His example code shows how you can use the standard date formatting strings in a Zend_Form validator (the "php" format) and an example using the Zend_Date::MONTH or Zend_Date::YEAR identifiers (the "iso" format). He also shows how he met two other requirements - validation for empty and a consistent format on the date validation ("Y-m-d").

tagged: validate date zendform zendframework iso format

Link:

PHP-GTK Community Site:
MkDevDVD (DVD Manager for Linux)
Jul 13, 2007 @ 13:49:00

The PHP-GTK Community Site has posted about a quick little application today - MkDevDVD - a DVD manager for Linux.

MkDevDVD is a /dev/dvd manager for Linux, which in itself does not sound too exciting. It allows you to quickly switch /dev/dvd between a symbolic link to your CDROM device, or mount a DVD ISO so that media players like Xine and Mplayer work correctly when looking up your DVD.

The application is currently in release 1.0 and can be downloaded directly here or you an get more information about it and how to install it from the project's homepage.

tagged: mkdevdvd dvd manage linux iso mkdevdvd dvd manage linux iso

Link:

PHP-GTK Community Site:
MkDevDVD (DVD Manager for Linux)
Jul 13, 2007 @ 13:49:00

The PHP-GTK Community Site has posted about a quick little application today - MkDevDVD - a DVD manager for Linux.

MkDevDVD is a /dev/dvd manager for Linux, which in itself does not sound too exciting. It allows you to quickly switch /dev/dvd between a symbolic link to your CDROM device, or mount a DVD ISO so that media players like Xine and Mplayer work correctly when looking up your DVD.

The application is currently in release 1.0 and can be downloaded directly here or you an get more information about it and how to install it from the project's homepage.

tagged: mkdevdvd dvd manage linux iso mkdevdvd dvd manage linux iso

Link:

Derick Rethans' Blog:
Calculating start and end dates of a week
Nov 16, 2006 @ 15:13:37

Derick Rethans has posted a quick tip to his blog today:

A friend asked "How do I calculate start (monday) and end (sunday) dates from a given week number for a specified year?" Instead of having to come up with your own algorithm you can simply do the following in PHP 5.1 and higher.

The (technically) three-line code uses ISO format for the date to tell you which day is the starting day of that week and which is the end. He only explains this format just a bit, so if you want more information, check out the strtotime function page.

tagged: start day end week date strtotime iso format start day end week date strtotime iso format

Link:

Derick Rethans' Blog:
Calculating start and end dates of a week
Nov 16, 2006 @ 15:13:37

Derick Rethans has posted a quick tip to his blog today:

A friend asked "How do I calculate start (monday) and end (sunday) dates from a given week number for a specified year?" Instead of having to come up with your own algorithm you can simply do the following in PHP 5.1 and higher.

The (technically) three-line code uses ISO format for the date to tell you which day is the starting day of that week and which is the end. He only explains this format just a bit, so if you want more information, check out the strtotime function page.

tagged: start day end week date strtotime iso format start day end week date strtotime iso format

Link: