Friday, November 6, 2020

PHP | jdmonthname() Function

PHP jdmonthname() Function


Hello dear readers! welcome back to another edition of our tutorial on PHP. In this tutorial guide, we are going to be discussing about PHP jdmonthname() Function.

The PHP jdmonthname() function returns a string which contains a month name. The mode tells this function which calendar to convert the Julian Day Count to, and what type of month names are to be returned.

Syntax

Following below is the syntax to use this function -

jdmonthname ( $julianday [, $mode] );

RECOMMENDED POST: PHP GregorianToJD() Function

Parameter Details

Sr.NoParameter & Description
1

julianday(Required)

The Julian Day to operate on

2

mode(Optional)

It 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

It returns the month name for the given Julian Day and calendar.

Example

Try out the below example -

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

Output

When the above code is executed, it will produce the following result -

November

RECOMMENDED POST: PHP | jddayofweek() Function

Alright guys! This is where we are rounding up for this tutorial post. In our next tutorial guide, we are going to be discussing about the PHP jdtofrench() Function.

Feel free to ask your questions where necessary and i will attend to them as soon as possible. If this tutorial was helpful to you, you can use the share button to share this tutorial.

Follow us on our various social media platforms to stay updated with our latest tutorials. You can also subscribe to our newsletter in order to get our tutorials delivered directly to your emails.

Thanks for reading and bye for now.
Share:

0 comments:

Post a Comment

Hello dear readers! Please kindly try your best to make sure your comments comply with our comment policy guidelines. You can visit our comment policy page to view these guidelines which are clearly stated. Thank you.