Fatal error: Call to undefined function: jdmonthname()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
noguru
Forum Commoner
Posts: 61
Joined: Thu Jun 06, 2002 4:03 am
Location: Just north of the City Of Gold, Land of Milk and Honey

Fatal error: Call to undefined function: jdmonthname()

Post 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()
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Have you checked the syntax of jdmonthname() to ensure that there's no problems in its code?

Mac
User avatar
noguru
Forum Commoner
Posts: 61
Joined: Thu Jun 06, 2002 4:03 am
Location: Just north of the City Of Gold, Land of Milk and Honey

Post 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"?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
User avatar
noguru
Forum Commoner
Posts: 61
Joined: Thu Jun 06, 2002 4:03 am
Location: Just north of the City Of Gold, Land of Milk and Honey

Post 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.
Post Reply