jdmonthname


php apg

RETURNS a calendar month name from a Julian Day Number, (JDN).



<?php

str jdmonthname 
int $julian_day int $mode )


where,

$julian_day A Julian Day Number, (JDN)

$mode The calendar mode
               
SEE the below TABLE )

?>

 $julian_day 


A Julian Day Number, (JDN) .



 $mode 

CONSTANT VALUE WHAT DOES
CAL_MONTH_GREGORIAN_SHORT 0 The abbreviated Gregorian month name
CAL_MONTH_GREGORIAN_LONG 1 The Gregorian month name
CAL_MONTH_JULIAN_SHORT 2 The abbreviated Julian month name
CAL_MONTH_JULIAN_LONG 3 The Julian month name
CAL_MONTH_JEWISH 4 The Jewish month name
CAL_MONTH_FRENCH 5 The French Republican month name
ed48


  1 EXERCISE   

<?php

$ts01 
0;

$ts02 2147483647;

$unx2jd01 unixtojd($ts01);
$gtdate01 getdate($ts01);

$unx2jd02 unixtojd($ts02);
$gtdate02 getdate($ts02);

$modes =[CAL_MONTH_GREGORIAN_SHORT => 'CAL_MONTH_GREGORIAN_SHORT'
          
CAL_MONTH_GREGORIAN_LONG => 'CAL_MONTH_GREGORIAN_LONG'
          
CAL_MONTH_JULIAN_SHORT => 'CAL_MONTH_JULIAN_SHORT'
          
CAL_MONTH_JULIAN_LONG => 'CAL_MONTH_JULIAN_LONG'
          
CAL_MONTH_JEWISH => 'CAL_MONTH_JEWISH' ];

foreach(
$modes as $m => $md)
{

$jdaymn01 jdmonthname($unx2jd01$m);

echo 
$md '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' 
$jdaymn01 '<br>';

}

echo 
'JDN = ' $unx2jd01 '<br><br>';

foreach(
$modes as $m => $md )
{

$jdaymn02 jdmonthname($unx2jd02$m);

echo 
$md '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' 
$jdaymn02 '<br>';

}

echo 
'JDN = ' $unx2jd02 '<br><br>';

?> 

  2 EXERCISE   

<?php

$ts03 
time();

$unx2jd03 unixtojd($ts03);
echo 
'Timestamp = ' $ts03 '<br>' 'JDN = ' 
$unx2jd03 '<br><br>';

$modes =[CAL_MONTH_GREGORIAN_SHORT => 'CAL_MONTH_GREGORIAN_SHORT'
          
CAL_MONTH_GREGORIAN_LONG => 'CAL_MONTH_GREGORIAN_LONG'
          
CAL_MONTH_JULIAN_SHORT => 'CAL_MONTH_JULIAN_SHORT'
          
CAL_MONTH_JULIAN_LONG => 'CAL_MONTH_JULIAN_LONG'
          
CAL_MONTH_JEWISH => 'CAL_MONTH_JEWISH' ];

foreach(
$modes as $m => $md
{

$jdaymn03 jdmonthname($unx2jd03$m);

echo 
$md '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' 
$jdaymn03 '<br>';
}

?>