try :-(
So I have been taught a lesson, not to let APPARENT results fool me.
--
Dilwyn Jones
- Original Message -
From: Rich Mellor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 25, 2006 8:39 PM
Subject: Re: [ql-users] month number
On Mon, 25 Sep 2006 20:40:17
Marcel Kilgus writes:
A good addition to that might be an ISO 8601 compatible WEEKNO% (week
number).
I only added the functions that are readily available (i.e. DATE$ had
to calculate all this anyway, it's just a matter of exposing the
values to BASIC). Was a 5 minutes job.
I am aware of
Phew the SBASIC/SuperBASIC Reference Manual was right then !!
On Tue, 26 Sep 2006 13:08:41 +0100, Dilwyn Jones [EMAIL PROTECTED]
wrote:
OK, I goofed on that one.
I assumed (wrongly) that because JM allowed 6 parameters
on a JM ROM and appeared to return a vaguely right number I assumed it
Dilwyn Jones wrote:
OK, I goofed on that one.
I assumed (wrongly) that because JM allowed 6 parameters
on a JM ROM and appeared to return a vaguely right number I assumed it
worked. Except it just pretends to work and of course you can't tell
accurately from an E number where in the year
Robert Newson wrote:
DATE returns the number of seconds [since 01/01/61] for the
/current/
date/time (I suspect it just reads a/the clock);
It can read the clock, but you can also do
PRINT DATE(1996,1,10,12,59,59)
Marcel
I suspect most people don't know about this form of DATE, since
Dilwyn Jones wrote:
Robert Newson wrote:
DATE returns the number of seconds [since 01/01/61] for the
/current/
date/time (I suspect it just reads a/the clock);
It can read the clock, but you can also do
PRINT DATE(1996,1,10,12,59,59)
Marcel
I suspect most people don't know about this
On Mon, 25 Sep 2006 20:40:17 +0100, Robert Newson
[EMAIL PROTECTED] wrote:
Dilwyn Jones wrote:
Robert Newson wrote:
DATE returns the number of seconds [since 01/01/61] for the
/current/
date/time (I suspect it just reads a/the clock);
It can read the clock, but you can also do
PRINT
Rich Mellor wrote:
...
It can read the clock, but you can also do
PRINT DATE(1996,1,10,12,59,59)
...
I suspect most people don't know about this form of DATE, since the QL
manual (Concepts - Date) does not list the 6 parameter version, and
neither does the Jan Jones Superbasic guide.
...
Robert Newson wrote:
Just tried:
PRINT DATE(1996,1,10,12,59,59)
on my JS [ROMed QL - later than JM] and it comes up with:
bad parameter
/was/ it a Minerva improvement?
So it would appear. From Minerva Technical Guide, section BAS.1:
The date procedures now accept a wider
Dilwyn Jones wrote:
Oops, I feel an article rewrite coming on... Jochen and Geoff, don't
use it yet until I've had time to digest this!!! (I'm on SMSQ/E 3.12,
so didn't know about this.)
As even I forgot about it, nobody knew! 3.13 is still not released
yet. But the commands will be part of
Marcel Kilgus writes:
On the subject of month numbers, I totally forgot about this, but I
did actually implement the functions YEAR%, MONTH%, DAY% and WEEKDAY%
for SMSQ/E 3.13 a few months ago.
Just noticed now while doing release sync with Wolfgang.
A good addition to that might be an ISO
Dilwyn Jones wrote:
Oops, I feel an article rewrite coming on... Jochen and Geoff,
don't
use it yet until I've had time to digest this!!! (I'm on SMSQ/E
3.12,
so didn't know about this.)
As even I forgot about it, nobody knew! 3.13 is still not released
yet. But the commands will be
Dilwyn Jones wrote:
(1) values returned are integers (assume so since function names end
in %)
Yes.
(2) your count system starts at 1 or 0 for month and day in month
1
(3) and for weekdays, I assume Sunday is day 1? And they work as 1 to
7, or 0 to 6?
Sun = 0, Mon = 1 etc.
LET y% =
P Witte wrote:
A good addition to that might be an ISO 8601 compatible WEEKNO% (week
number).
I only added the functions that are readily available (i.e. DATE$ had
to calculate all this anyway, it's just a matter of exposing the
values to BASIC). Was a 5 minutes job.
I also often find
Marcel Kilgus wrote:
...
I only added the functions that are readily available (i.e. DATE$ had
to calculate all this anyway, it's just a matter of exposing the
values to BASIC). Was a 5 minutes job.
Precisely what I would have done.
I also often find SECONDS(year, month, day, hour, minutes,
Robert Newson wrote:
DATE returns the number of seconds [since 01/01/61] for the /current/
date/time (I suspect it just reads a/the clock);
It can read the clock, but you can also do
PRINT DATE(1996,1,10,12,59,59)
Marcel
___
QL-Users Mailing
On the subject of month numbers, I totally forgot about this, but I
did actually implement the functions YEAR%, MONTH%, DAY% and WEEKDAY%
for SMSQ/E 3.13 a few months ago.
Just noticed now while doing release sync with Wolfgang.
Marcel
___
QL-Users
In message [EMAIL PROTECTED], Dilwyn Jones
[EMAIL PROTECTED] writes
Aaargh, sorry this was meant to go direct to Robert!
That's me blacklisted now I guess.
Robert, I'll send it separately again, as the attachment may not
have
made it through to the list.
--
Dilwyn Jones
There was no
Dilwyn Jones writes:
PS Still puzzled re; diff between O.S. and 'platform' in our recent
context.
:(
The operating system (QDOS or Windows) is that which is running your
programs and making sure all the hardware bits and pieces of your
computer work properly (or not as the case may be).
PS Still puzzled re; diff between O.S. and 'platform' in our
recent
context.
:(
The operating system (QDOS or Windows) is that which is running
your
programs and making sure all the hardware bits and pieces of your
computer work properly (or not as the case may be).
The 'platform' in
Thank you, consider it added!
--
Dilwyn Jones
- Original Message -
From: Robert Newson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 20, 2006 8:33 PM
Subject: Re: [ql-users] month number
Dilwyn Jones wrote:
...
In fact, as I was given permission to include
In fact, as I was given permission to include those articles on the
Documentation CD, may I ask you if I can also include these
routines
as
well?
Sure.
Thanks for letting me use the routines, Robert.
With coincidental timing, I was asked to come up with an article for
QL Toady and Quanta
]
Sent: Thursday, September 21, 2006 6:01 PM
Subject: Re: [ql-users] month number
In fact, as I was given permission to include those articles on
the
Documentation CD, may I ask you if I can also include these
routines
as
well?
Sure.
Thanks for letting me use the routines, Robert
In message [EMAIL PROTECTED], Dilwyn Jones
[EMAIL PROTECTED] writes
Aaargh, sorry this was meant to go direct to Robert!
That's me blacklisted now I guess.
Robert, I'll send it separately again, as the attachment may not have
made it through to the list.
--
Dilwyn Jones
There was no
Is there a way of returning the current month as a number?
I had thought I had come up with a function for this, but it is
getting the
ends of some months wrong, eg 1 May is coming out as 31 Apr! (Which
seems
odd as I thought I had checked out all the month bounds when
writing the
USA
-Original Message-
From: Dilwyn Jones [EMAIL PROTECTED]
Sent: Sep 20, 2006 1:22 PM
To: QL Users List [EMAIL PROTECTED]
Subject: Re: [ql-users] month number
Is there a way of returning the current month as a number?
I had thought I had come up with a function
Dilwyn Jones wrote:
...
In fact, as I was given permission to include those articles on the
Documentation CD, may I ask you if I can also include these routines
as
well?
Sure.
If so, a few lines explaining the algorithm may be in order. I
understand parts of it, but not all of it:
PROTECTED]
Sent: Tuesday, September 19, 2006 6:43 AM
Subject: Re: [ql-users] month number
On 18 Sep 2006 at 17:17, Dilwyn Jones wrote:
A help request:
Hope this helps :
DEFine FuNction make_all_months$
rem this makes a string JanFeb... in the current language
rem this should be called
Dilwyn (with one 'n') said -
...The collective sharing of information and ideas is a brilliant feature
of the QL
scene.
Couldn't agree more!
Have a good one, wherever you are.
John in Wales
PS Still puzzled re; diff between O.S. and 'platform' in our recent context.
:(
--
No virus
Dilwyn (with one 'n') said -
Oh dear, I'm not going to hear the last of that now am I?
...The collective sharing of information and ideas is a brilliant
feature
of the QL
scene.
Couldn't agree more!
Have a good one, wherever you are.
John in Wales
PS Still puzzled re; diff
Robert Newson wrote:
OOps, typo:
Obviously this:
DEF my_mth_no(secs)
should be
DEF FN my_mth_no(secs)
LOC dy, yr, mn
dy = INT(secs / 86400) + 306
yr = INT((dy + .8) / 365.25)
mn = INT((dy - INT(yr * 365.25) + 31) / 30.6) + 2
IF mn 12 : mn = mn - 12
RET
Dilwyn Jones wrote:
A help request:
Is there a way of returning the current month as a number?
...
Seems so clumsy I'm sure there must be a better way! I need to use it
in my diary program to find entries for the current day or current
month. The only other idea I've come up with so far
On 18 Sep 2006 at 17:17, Dilwyn Jones wrote:
A help request:
Hope this helps :
DEFine FuNction make_all_months$
rem this makes a string JanFeb... in the current language
rem this should be called during the initialisation part
rem eg. all_months$=make_all_months$
LOCal string$,lp%,a$,temp
33 matches
Mail list logo