Thank you kindly Abrita & Jeffrey.
Unfortunately, I have already found a similar solution, but I was trying to find a slightly more ambitious results like the final effort to generate a custom function that uses lat / long data that failed:
To calculate the moonrise time for a specific location and date in the Wolfram Language, we can create a custom function ChatCodeInlineTemplate[Moonrise[]] that calculates the moonrise time using the Horizon Event function. Here is the code for the custom ChatCodeInlineTemplate[Moonrise[]] function:
Moonrise[location_,date_]:=Module[{horizonEvent},
horizonEvent=HorizonEvent["Moon",location,date,"Rise"];
DateString[horizonEvent,{"Hour",":","Minute",":","Second"}]
]
(* Example usage *)
location=GeoPosition[{38.8783,-77.0687}];
date=DateObject[{2024,3,25}];
moonriseTime=Moonrise[location,date]
This custom ChatCodeInlineTemplate[Moonrise[]] function uses the ChatCodeInlineTemplate[HorizonEvent] function to calculate the moonrise time for a specific location and date. You can use this function by providing the geographic location as a GeoPosition object and the date as a DateObject.
Comments? Suggestions? What is wrong with the code ChatGPT / Wolfram generated? Where did it go off the track?