Page 1 of 1

Date support for old dates & function 'cross call'

Posted: Wed Jul 16, 2003 2:53 pm
by tony
Hi,

I think two things would be nice to have:
--------------- Date support -------------------
date = ParseDate("%yyyy", "1983")
Debug date

date = ParseDate("%yyyy", "1933")
Debug date
--

The date library doesn't support years before the 1970's (I suppose), which is a real pain.

--------------- Date support -------------------
Procedure a()
b()
EndProcedure

Procedure b()
a()
EndProcedure
--

Well not exatcly that, because it would cause an infinite loop, but something like C's prototypes, that would allow to call a procedure that hasn't been defined yet.

Tony

Re: Date support for old dates & function 'cross call'

Posted: Wed Jul 16, 2003 3:22 pm
by Pupil
tony wrote: Well not exatcly that, because it would cause an infinite loop, but something like C's prototypes, that would allow to call a procedure that hasn't been defined yet.
You mean 'Declare'?

Posted: Wed Jul 16, 2003 5:45 pm
by tony
tony slaps himself around with a big trout. 'Declare' is what I was looking for. Any idea about the date business?

Posted: Wed Jul 16, 2003 6:34 pm
by Pupil
tony wrote:tony slaps himself around with a big trout. 'Declare' is what I was looking for. Any idea about the date business?
You would have to create your own date parser and use API to get the time from that..

For more info see API functions:
'SystemTimeToFileTime', 'FileTimeToSystemTime'
and check out the structures:
'SYSTEMTIME', 'FILETIME'

*Edit: FILETIME doesn't support dates earlier than January 1, 1601.

Re: Date support for old dates & function 'cross call'

Posted: Thu Jul 17, 2003 12:27 am
by Fred
tony wrote: date = ParseDate("%yyyy", "1983")
Debug date
This already works:

Code: Select all

date = ParseDate("%yyyy", "1983") 
Debug FormatDate("%yyyy", date)

Posted: Thu Jul 17, 2003 6:53 pm
by tony
Yep, but this one doesn't:

date = ParseDate("%yyyy", "1929")
Debug FormatDate("%yyyy", date)