mickeymouse Posted February 16, 2020 Share Posted February 16, 2020 $mydt=$mymm.','.$mydd.','.$myyr; print("$mydt<br>"); ------------------>= 1,1,2020 $myjd=gregoriantojd($mydt); print("$myjd<br>"); ------------------>= blank (why???) $myname=jdmonthname($myjd,0); print("$myname<br>"); ---------------->= blank (why???) W3 Documentation: $jd=gregoriantojd(1,13,1998); echo jdmonthname($jd,0); ------------>= Jan It seems to me my code agrees with the documentation but it doesn't work. Link to comment Share on other sites More sharing options...
Ingolme Posted February 16, 2020 Share Posted February 16, 2020 You're passing a single string into gregoriantojd() but it expects three integers. Link to comment Share on other sites More sharing options...
mickeymouse Posted February 16, 2020 Author Share Posted February 16, 2020 I thought I was passing 3 integers via $mydt because it contains "1,1,2020" I've made the change to pass 3 integers ($mymm,$mydd,$myyr) and it works fine. Many thanks, Mickey Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now