cvs: pear /Date Date.php

From: Date: Sun, 02 Oct 2005 13:45:28 +0000
Subject: cvs: pear /Date Date.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-35216@lists.php.net to get a copy of this message
pajoye Sun Oct 2 09:45:28 2005 EDT Modified files: /pear/Date Date.php Log: - #2652, add %h and %i support (rob at wildlime dot com) http://cvs.php.net/diff.php/pear/Date/Date.php?r1=1.30&r2=1.31&ty=u Index: pear/Date/Date.php diff -u pear/Date/Date.php:1.30 pear/Date/Date.php:1.31 --- pear/Date/Date.php:1.30 Sun Oct 2 09:41:10 2005 +++ pear/Date/Date.php Sun Oct 2 09:45:27 2005 @@ -23,7 +23,7 @@ * @author Pierre-Alain Joye <pajoye@php.net> * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/2_02.txt PHP License - * @version CVS: $Id: Date.php,v 1.30 2005/10/02 13:41:10 pajoye Exp $ + * @version CVS: $Id: Date.php,v 1.31 2005/10/02 13:45:27 pajoye Exp $ * @link http://pear.php.net/package/Date */ @@ -349,10 +349,17 @@ case "H": $output .= sprintf("%02d", $this->hour); break; + case 'h': + $output .= sprintf("%d", $this->hour); + break; case "I": $hour = ($this->hour + 1) > 12 ? $this->hour - 12 : $this->hour; $output .= sprintf("%02d", $hour==0 ? 12 : $hour); break; + case "i": + $hour = ($this->hour + 1) > 12 ? $this->hour - 12 : $this->hour; + $output .= sprintf("%d", $hour==0 ? 12 : $hour); + break; case "j": $output .= Date_Calc::julianDate($this->day,$this->month,$this->year); break;

« previous php.pear.cvs (#35216) next »