note 45702 added to function.getdate
| From: | modulus at osu1 dot php dot net | Date: | Wed, 15 Sep 2004 16:35:01 +0000 |
| Subject: | note 45702 added to function.getdate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-76748@lists.php.net to get a copy of this message | ||
in response to sol2ray at yahoo dot com
function date_sign($mday) {
if($mday % 10 == 1)
$day_sign = 'st';
elseif ($mday % 10 == 2 )
$day_sign = 'nd';
elseif($mday % 20 == 3)
$day_sign = 'rd';
else
$day_sign = 'th';
return $day_sign; }
For a slightly shorter notation.
----
Manual Page -- http://www.php.net/manual/en/function.getdate.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45702
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45702&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45702&report=yes
Search -- http://master.php.net/manage/user-notes.php