Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
137 user(s) are online (120 user(s) are browsing Forums)

Members: 0
Guests: 137

more...

Support us!

Headlines

 
  Register To Post  

Arexx: how to use date() with a string?
Just can't stay away
Just can't stay away


See User information
Hi all,

If I do:
year='2007'
month='01'
day='01'

date(B,year || month || day,S)
=> Invalid argument to function

I tried using a variable where I concat "year" "month" and "day" but it's the same.
Any hint?


Edited by Elwood on 2007/9/23 14:18:16
Philippe 'Elwood' FERRUCCI
Sam460ex 1.10 Ghz
http://elwoodb.free.fr
Go to top
Re: Arexx: how to use date() with a string?
Quite a regular
Quite a regular


See User information
@Elwood

Examples:

9.AOS4:> rx "say date('b','20070101', 's')"
733042

9.AOS4:> rx "say date(B,'20070101', S)"
733042

(B and S should be uninitialized, then they default to "B"/"S")

Jack

Resized Image
"the expression, 'atonal music,' is most unfortunate--it is on a par with calling flying 'the art of not falling,' or swimming 'the art of not drowning.'. A. Schoenberg
Go to top
Re: Arexx: how to use date() with a string?
Just can't stay away
Just can't stay away


See User information
@Jack

They are uninitialised. And even if I user 's' instead of s it still gives an error.

The script is executed from inside Dopus, I think I'll have to write to CON: to have a better idea of what is going on.

Thanks.

Edit: ok found it. The problem was in another iteration of the loop. Damn, it's so easy to do a mistake when the code seems too obvious.


Edited by Elwood on 2007/9/23 19:50:00
Philippe 'Elwood' FERRUCCI
Sam460ex 1.10 Ghz
http://elwoodb.free.fr
Go to top
Re: Arexx: how to use date() with a string?
Just popping in
Just popping in


See User information
@Elwood

You're aware that the ARexx Date("B") does not return the correct value? The describtion says days since January 1, 0001 but it actually returns the days since January 1, 0000.

It looks like the bug is still present, date('b','20070101', 's') should be 732676 and not 733042.

Go to top
Re: Arexx: how to use date() with a string?
Just popping in
Just popping in


See User information
@Gazelle

Quote:

You're aware that the ARexx Date("B") does not return the correct value? The describtion says days since January 1, 0001 but it actually returns the days since January 1, 0000.

It looks like the bug is still present, date('b','20070101', 's') should be 732676 and not 733042.

rexxsyslib 45.7 (24.9.2007)

- The Date() function with option B returned the number of days since
0000-01-01 instead of 0001-01-01 as documented, fixed. Thanks to
Bernd Gollesch for the report.

- Late Y2K fix: The Date() function with option C always returned the
number of days since 1900-01-01, for dates since 2000-01-01 it now
returns the number of days in the current century as documented.

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project