News Feed
Sections




News Archive
feed this:

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

Rob Allen's Blog:
Validating dates
November 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").

0 comments voice your opinion now!
validate date zendform zendframework iso format


PHP-GTK Community Site:
MkDevDVD (DVD Manager for Linux)
July 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.

1 comment voice your opinion now!
mkdevdvd dvd manage linux iso mkdevdvd dvd manage linux iso


Derick Rethans' Blog:
Calculating start and end dates of a week
November 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.

0 comments voice your opinion now!
start day end week date strtotime iso format start day end week date strtotime iso format



Community Events





Don't see your event here?
Let us know!


composer security framework version community podcast release conference voicesoftheelephpant opinion language introduction list laravel symfony library artisanfiles tool interview series

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework