note 103509 modified in function.jdmonthname by danbrown

From: Date: Sun, 17 Apr 2011 14:20:43 +0000
Subject: note 103509 modified in function.jdmonthname by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-178922@lists.php.net to get a copy of this message
Use this function if you prefer to use the standard calendar constants: <?php function jdmonthname2($julianday, $calendar, $abbrev = false) { if($calendar == CAL_GREGORIAN && $abbrev) $mode = 0; elseif($calendar == CAL_GREGORIAN && !$abbrev) $mode = 1; elseif($calendar == CAL_JULIAN && $abbrev) $mode = 2; elseif($calendar == CAL_JULIAN && !$abbrev) $mode = 3; elseif($calendar == CAL_JEWISH) $mode = 4; elseif($calendar == CAL_FRENCH) $mode = 5; else $mode = 10; //use an invalid mode and let the underlying function handle it return jdmonthname($julianday, $mode); } ?> --was-- Use this function if you prefer to use the standard calendar constants: function jdmonthname2($julianday, $calendar, $abbrev = false) { if($calendar == CAL_GREGORIAN && $abbrev) $mode = 0; elseif($calendar == CAL_GREGORIAN && !$abbrev) $mode = 1; elseif($calendar == CAL_JULIAN && $abbrev) $mode = 2; elseif($calendar == CAL_JULIAN && !$abbrev) $mode = 3; elseif($calendar == CAL_JEWISH) $mode = 4; elseif($calendar == CAL_FRENCH) $mode = 5; else $mode = 10; //use an invalid mode and let the underlying function handle it return jdmonthname($julianday, $mode); } http://php.net/manual/en/function.jdmonthname.php

« previous php.notes (#178922) next »