centuryCutoff

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
NZN37
Posts: 8
Joined: Sat Apr 14, 2007 8:12 pm

centuryCutoff

Post by NZN37 » Wed Mar 04, 2009 10:15 pm

Is there a way to disable the centuryCutoff property?

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Thu Mar 05, 2009 6:34 am

No, there isn't - it's necessary for Revolution to be able to determine whether a date is in the 20th or 21st century. What problem are you encountering that needs to be solved?

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

NZN37
Posts: 8
Joined: Sat Apr 14, 2007 8:12 pm

Post by NZN37 » Thu Mar 05, 2009 8:01 am

I need to run dates a few hundred years forward in an astronomy program.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Mar 05, 2009 10:42 am

Dear NZN37,

Why don't you use four-digit years?

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

NZN37
Posts: 8
Joined: Sat Apr 14, 2007 8:12 pm

Post by NZN37 » Thu Mar 05, 2009 7:47 pm

"Why don't you use four-digit years? "

CenturyCutoff still interferes.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Mar 05, 2009 8:29 pm

Dear NZN37,

You might want to provide just a little bit more info to enable me and others to help you.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

NZN37
Posts: 8
Joined: Sat Apr 14, 2007 8:12 pm

Post by NZN37 » Thu Mar 05, 2009 8:52 pm

Mark wrote:
You might want to provide just a little bit more info to enable me and others to help you.
If this handler produced the correct date everything would be fine:

on mouseUp
put the long date into temp
convert temp to seconds
repeat 100
add 1.6*365.25*86400 to temp
end repeat
convert temp to long date
put temp
end mouseUp

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Mar 05, 2009 9:12 pm

Dear NZN37,

After running your script, I get

Sunday, March 5, 2169

in the message box. Is this wrong? What should it be?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

NZN37
Posts: 8
Joined: Sat Apr 14, 2007 8:12 pm

Post by NZN37 » Thu Mar 05, 2009 9:31 pm

Mark wrote:After running your script, I get Sunday, March 5, 2169
I get Friday, December 13, 1901.

mroam
Posts: 11
Joined: Tue Nov 27, 2007 8:11 pm
Contact:

Post by mroam » Thu Mar 05, 2009 10:27 pm

I'm also getting "Monday, March 6, 2169" on my computer (mac, osX 10.5). What kind of machine are you on, and what do you get if you try the following script?

Code: Select all

local temp
put the long date into temp 
convert temp to seconds 
convert temp to internet date
answer temp
maybe the long date or the dateFormat are working strangely on your computer.

NZN37
Posts: 8
Joined: Sat Apr 14, 2007 8:12 pm

Post by NZN37 » Thu Mar 05, 2009 10:42 pm

mroam wrote:I'm also getting "Monday, March 6, 2169" on my computer (mac, osX 10.5). What kind of machine are you on, and what do you get if you try the following script?

Code: Select all

local temp
put the long date into temp 
convert temp to seconds 
convert temp to internet date
answer temp
maybe the long date or the dateFormat are working strangely on your computer.
I get Thu, 5 Mar 2009 02:00:00 -0700 using your code. Mac osX 10.5.6, Rev version 2.7.2

Post Reply