note 68214 added to function.strftime

From: Date: Tue, 18 Jul 2006 16:25:25 +0000
Subject: note 68214 added to function.strftime
Groups: php.notes 
Request: Send a blank email to php-notes+get-114890@lists.php.net to get a copy of this message
phloe, the value 13 will still return "rd" using your function. As far as I know (and can be bothered to calculate), it's the only number that causes an exception to the generic rule (when taking the values 1 - 31 into account), so, you could add a single line to your function that checks for 13 and returns "th" automatically i.e. <?php // First line of your function... if($d == 13) return "th"; ?> ---- Server IP: 194.246.101.61 Probable Submitter: 82.232.9.222 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.strftime.php Edit -- http://master.php.net/note/edit/68214 Del: integrated -- http://master.php.net/note/delete/68214/integrated Del: useless -- http://master.php.net/note/delete/68214/useless Del: bad code -- http://master.php.net/note/delete/68214/bad+code Del: spam -- http://master.php.net/note/delete/68214/spam Del: non-english -- http://master.php.net/note/delete/68214/non-english Del: in docs -- http://master.php.net/note/delete/68214/in+docs Del: other reasons-- http://master.php.net/note/delete/68214 Reject -- http://master.php.net/note/reject/68214 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#114890) next »