We now have a youtube channel. Subscribe!

PHP | jdmonthname() Function

PHP jdmonthname() Function


Hello folks! welcome back to a new edition of our tutorial on PHP. In this tutorial guide, we are going to be studying about the PHP jdmonthname() Function.

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

Syntax

Following below is the syntax to use this function -

jdmonthname ( $julianday [, $mode] );


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

This PHP function 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


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

Feel free to ask your questions where necessary and we 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.

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.
© 2023 ‧ WebDesignTutorialz. All rights reserved. Developed by Jago Desain