Custom properties and getProp

David Vaughan drvaughan55 at mac.com
Tue Jun 18 00:37:01 CDT 2002


On Tuesday, June 18, 2002, at 03:00 , Shao Sean wrote:

> howabout just using this code in your stack script or as an "inserted" 
> script in your message hierarchy
>
>
> function monthDays paramMonth, paramYear
>   # change the numbers to the string version of the month name you are 
> using
>   if (paramMonth is among the items of "1,3,5,7,8,10,12") then
>     return 31
>   else if (paramMonth is among the items of "4,6,9,11") then
>     return 30
>   else if ((paramYear MOD 400 = 0) OR ((paramYear MOD 100 <> 0) AND 
> (paramYear MOD 4 = 0))) then
>     return 29  -- leap year
>   else
>     return 28
>   end if
> end monthDays

True. I agree I can solve the problem with code but what I really want 
is to understand the behaviour of properties in this situation. There 
ought to be a solution along the lines I attempted, and when I have it 
then I should have a more general capability to exploit properties 
elsewhere.

regards
David




More information about the use-livecode mailing list