Author |
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 04 2005 at 09:53 | IP Logged
|
|
|
A bit late, but I just came up with this to add to one of my web pages...
Code:
<!-- Set LOCAL1 to date desired and LOCAL2 to date description-->
<% ph_rtne( ph_setvar_s( 1, 1, "12/24" + "/") + ph_setvar_s( 1, 2, "Christmas"))%>
<% ph_rtne( ph_setvar_a( 1, 3, daysafter ( date( today()), date( "[LOCAL1]" + year( date( today() )) ) ))) %>
<% if( [LOCAL3] <0, "", [LOCAL3] + " days until " + "[LOCAL2]")%> |
|
|
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 06 2005 at 08:00 | IP Logged
|
|
|
Update...
Code:
<!-- Set LOCAL1 to date desired and LOCAL2 to date description-->
<% ph_rtne( ph_setvar_s( 1, 1, "12/24") + ph_setvar_s( 1, 2, "Christmas"))%>
<% ph_rtne( ph_setvar_a( 1, 3, daysafter( date( today()), date( "[LOCAL1]" + "/" + year( date( today() )) ) ))) %>
<% case( [LOCAL3] when is<0 then "" when 0 then "It's " + "[LOCAL2]" + "!" else [LOCAL3] + " days until " + "[LOCAL2]") %> |
|
|
Edited by TonyNo
|
Back to Top |
|
|
|
|