1934 Was Not Such A Good Year

Trevor DeVore lists at mangomultimedia.com
Thu Feb 2 16:10:36 EST 2006


On Feb 2, 2006, at 12:56 PM, Gregory Lypny wrote:

> I just want to confirm that Revolution does not recognize years  
> before 1935.  The following handler converts a short date in 1934  
> to it's long date and the result is 2034.
>
> 	Gregory
>
> set useSystemDate to true
> put "13/5/1934" into x
> if x is a date
> then
> put "Yes, it's a date."
> convert x to long date
> put return & x after msg
> else
> put "Nope."
> end if

Gregory,

I've found that working with dates in Rev can be kind of a pain.  I  
have a history project that needs to deal with dates in B.C. and  
A.D.  What I am experimenting with right now is using Julian dates  
<http://en.wikipedia.org/wiki/Julian_date>.  These end up being  
decimal number that is easy to compare, sort, etc.  I found some  
javascript functions for converting YYYY-MM-DD to Julian dates here:  
<http://aa.usno.navy.mil/js/JulianDate.js>.  The calculator that uses  
that code is at <http://aa.usno.navy.mil/data/docs/JulianDate.html>.

I have the Transcript versions available if you want to see them but  
I have put them through enough testing yet so there may still be some  
glitches.

Maybe someone else has a better suggestion then going this route but  
Julian Dates seemed to solve the problems I was facing.


-- 
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com





More information about the use-livecode mailing list