Sarah Reichelt has a DateTime stack which can convert to Julian at:

http://www.troz.net/rev/index.irev?category=Library#stacks

I haven't tried it but you might want to give that a shot too. 

Bob


On May 8, 2012, at 1:32 PM, dfepst...@comcast.net wrote:

> 
> 
> 
> I want to count the number of days between some past date and today. 
> 
> I tried this (using Rev 3.0): 
> 
>   
> 
> on mouseUp 
> 
>   put "March 12, 2012" into a 
> 
>   convert a to seconds -- LC should understand this as midnight 
> 
>   get the date 
> 
>   convert it to seconds -- should also be midnight 
> 
>   put (it - a)/(24*3600) -- elapsed seconds divided by seconds per day 
> 
> end mouseUp 
> 
>   
> 
> This yields "57", which seems right. 
> 
>   
> 
> But if I change the first line to 
> 
>   
> 
>   put "March 11, 2012" into a 
> 
>   
> 
> the result is not an integer: 
> 
> 57.958333 
> 
>   
> 
> Why would that be? 
> 
>   
> 
> David Epstein 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to