Posted: March 17 2003 at 14:38 | IP Logged
|
|
|
Patrick,
I don't know if I would call it a bug or a shortcoming of the manual .
In your first example, if you change the part "date(string" to "datetime(string" then you should get back the proper answer. The function is expecting a datetime variable instead of a date. Since this is the case, you can simplify your function by just calling: ph_getsuntime(today(),2).
If you are trying to calculate dates in the future, you can also use: ph_getsuntime(relativedate(today(),3),2) to calculate 3 days from the current day. The today function will either return a date or a datetime depending upon the context, so it will work in the above situations.
HTH,
Dave.
|