Tutorials Point


  Learning PHP
  Advanced PHP
  PHP Function Reference
  PHP Useful Resources
  Selected Reading

Copyright © 2014 by tutorialspoint



  Home     References     Discussion Forums     About TP  

PHP Function jdmonthname()


previous

Advertisements

Syntax

jdmonthname ( $julianday [, $mode] );

Definition and Usage

This function returns a string containing a month name. mode tells this function which calendar to convert the Julian Day Count to, and what type of month names are to be returned.

Paramters

ParameterDescription
juliandayRequired. The Julian Day to operate on
modeOptional. Defines which calendar to convert the Julian day count to, and what type of month names are to be returned. Mode values:
  • 0 - Gregorian - abbreviated (Jan, Feb, Mar, etc.)
  • 1 - Gregorian (January, February, March, etc.)
  • 2 - Julian - abbreviated (Jan, Feb, Mar, etc.)
  • 3 - Julian (January, February, March, etc.)
  • 4 - Jewish (Tishri, Heshvan, Kislev, etc.)
  • 5 - French Republican (Vendemiaire, Brumaire, Frimaire, etc.)

Return Value

The month name for the given Julian Day and calendar.

Example

Try out following example:

<?php
$jd=cal_to_jd(CAL_GREGORIAN,date("m"),date("d"),date("Y"));
echo(jdmonthname($jd,1));
?> 

This will produce following result:

January

previous Printer Friendly

Advertisements


  

Advertisements