You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have that in Rexx source. Peter Jacob has a C implementation for Brexx on MVS.René.On 8 Nov 2024, at 12:53, Ross Patterson ***@***.***> wrote:
The only thing preventing bREXX from fully implementing Rexx level 3.40 is the highly useful DATE(BASEDATE) function.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
I think I've seen that in tests/date_.exec. Although that's a rather complex code file.
And much to my surprise, I just found a date converter I wrote in Rexx 33 years ago, CVD(Value, InFormat, OutFormat).[1]
Peter Jacob has a C implementation for Brexx on MVS.
Oh! Nice! Yup: lstring/date.c. And it's so easy: if (strncasecmp(LSTR(*datestr), "BASE", 1) == 0) JDN = JDN + 1721426;, where JDN is the Julian day number, as used in astronomy (not the Julian date as used in DATE(JULIAN)).
[1] Interestingly, CVD() includes the following, because I guess I didn't prove to my own satisfaction that the two formulas are equivalent. I can't recall ever hearing this particular klaxon horn go off.
/*! This is the basedate formula from the REXX reference */BaseDate=((Year-1)*365)+(Day-1)+((Year-1)%4)-,((Year-1)%100)+((Year-1)%400)/*! This is the basedate formula from IXXRFN(DATEBASE) */BD2=((Year-1)%4)*(4*365+1)+((Year-1)//4)*365+Day-,((Year-1)%100)+((Year-1)%400)-1IfBaseDate\=BD2thenDo'MSG * Ahoogah! Ahoogah! Dive! Dive! Dive'Say'Basedate formulas differ: BaseDate='BaseDate'BD2='BD2ReturnEnd
The only thing preventing bREXX from fully implementing Rexx level 3.40 is the highly useful
DATE(BASEDATE)
function.The text was updated successfully, but these errors were encountered: