T.R | Title | User | Personal Name | Date | Lines |
---|
179.1 | Old conference 2832/2428.1 | IOSG::TALLETT | Mit Schuh bish hi | Thu Mar 05 1992 17:22 | 8 |
| Hi there!
You could try 2832.* and 2428.1 in the old conference. They find
the difference between two dates, but I must confess that they
look dauntingly complex.
Regards,
Paul
|
179.2 | CAL SET DATE [parameter] | HYTIDE::CREAMER | Keep a low profile | Thu Mar 05 1992 18:17 | 22 |
|
Julia,
It sounds like the CALENDAR SET DATE function will do want you want.
It loads the symbol into OA$TM_DATE. As an example, the following
script _should_ increment the date in the symbol #HOTEL_DATE by
one day (and return OA$TM_DATE to it's original value).
.LABEL START
GET #OLD_TM_DATE = OA$TM_DATE
CAL SET DATE #HOTEL_DATE
CAL SET DATE +1d
GET #HOTEL_DATE = OA$TM_DATE
CAL SET DATE #OLD_TM_DATE
.EXIT
Will this work??
Jack
|
179.3 | | IOSG::MAURICE | IOSG ain't a place to raise a kid | Thu Mar 05 1992 18:44 | 6 |
| You were nearly there - you just needed a bit of indirection - e.g.
get #DATE1 = OA$DATE
GET OA$FUNCTION = 'GET CAL$SET_DATE:#DATE2.%WHOLE["' #DATE1 ' +1D"]'
gets the result in #date2
|
179.4 | Even simpler | SCOTTC::MARSHALL | Pearl-white, but slightly shop-soiled | Fri Mar 06 1992 14:10 | 10 |
| Hi,
It can be done even more simply...
GET #DATE = OA$DATE "+1d"
GET CAL$SET_DATE:#NEWDATE.%WHOLE[#DATE]
Just substitute whatever you need for 'OA$DATE'...
Scott
|
179.5 | | KERNEL::SMITHERSJ | Living on the culinary edge.... | Fri Mar 06 1992 14:41 | 5 |
| Brilliant.
Thanks to everyone - works a treat.
julia
|
179.6 | only works if a day is really a day | SQM::DOTY | Both sides now | Mon Mar 09 1992 14:51 | 18 |
| RE: .4, .3., .2
> GET #DATE = OA$DATE "+1d"
-----------------------^
This only works for English users or other languages where a "day" begins with
the letter "d". French users would need "d" to be "j" for "jour", and German
users would need "d" to be "t" for "tag".
The most correct way, and the way TM does it, is to use the symbol
OA$TM_SETDATE_D.
Gosh, I only left IOSG a few months ago and it seems all I18N knowledge has
already flown out the window!!! :-)
FWIW,
Susie
|
179.7 | | IOSG::MAURICE | IOSG ain't a place to raise a kid | Mon Mar 09 1992 15:36 | 11 |
| Hi Susie,
Thanks for the info. You omitted an _ so the symbol is actually
OA$_TM_SETDATE_D
From a cursory glance at the documentation of CAL$SET_DATE there is no
mention of this trap for the unwary. Is the documentation wrong?
Cheers
Stuart
|
179.8 | More TM symbols to aid Xlation | SQM::DOTY | Back in the U S of A | Mon Mar 09 1992 18:45 | 21 |
|
Hi Stuart,
Thanks for catching my typo. Sometimes I get over-enthusiastic when it
comes to I18n topics and my fingers can't keep up with my brain!!!
Yep, it sounds like the documentation might be wrong. The symbols
OA$_TM_SETDATE_D and OA$_TM_SETDATE_W were added in V2.4 to save
translators a lot of grief on TM forms when using the GOLD Arrow
keys.
There are also symbols for the words "TODAY", "TOMORROW", "YESTERDAY",
etc.
Obviously, when using the symbols the syntax must be of the order:
GET OA$FUNCTION = "CAL SET DATE +1" OA$_TM_SETDATE_D
FWIW,
Susie
|