Page 1 of 1

Fatal error: Call to undefined function: jdmonthname()

Posted: Wed Jul 17, 2002 5:14 am
by noguru
Any ideas why this script is not executing?

$vmonthname = jdmonthname($vday,1); (where $vday="7")

It should return "July", but instead I get this error:

Fatal error: Call to undefined function: jdmonthname()

Posted: Wed Jul 17, 2002 5:16 am
by twigletmac
Have you checked the syntax of jdmonthname() to ensure that there's no problems in its code?

Mac

Posted: Wed Jul 17, 2002 5:39 am
by noguru
Yes, the syntax is correct and I even get attributes when I click "(" after the jdmonthname(. Weird enough, when I copy it from the manual as "JDMonthName" instead of "jdmonthname" the font color changes to blue, but then I don't get the attributes when I click "(".

I also see the function expects the attributes to be both integers, like "jdmonthname(7,1)" instead of "jdmonthname($vday,1)" where $vday="7", but this is not working either.

Is there maybe another function to get "July" from "7"?

Posted: Wed Jul 17, 2002 6:10 am
by twigletmac
I thought it was a user-defined function but now I check and it's part of the calendar functions which seem kinda cool. Only thing is you need PHP compiled with --enable-calendar, if you have Windows the functions should be built in.

Mac

Posted: Wed Jul 17, 2002 6:50 am
by noguru
The function is apparently available on my own computer (Win2000), but it seems not on our Unix server.

I've managed to get another way of returning the monthname from an integer:

echo date("F",mktime(0,0,0,$DraftMonth,$DraftDay,$DraftYear))

This works fine.