Arexx (43/67)

From:Mark Hessling
Date:20 Oct 99 at 21:51:14
Subject:Re: Re: Date

From: Mark Hessling <m.hessling@qut.edu.au>

On Wed, 20 Oct 1999, Neil Bothwick wrote:

> From: "Neil Bothwick" <neil@wire.net.uk>
>
> Mike Cardwell said,
>
> > I need for a part of one of my scripts, something that can figure out
> > the number of days between two dates eg 20-Aug-99 and 10-Oct-99 is 21
> > days. The dates are in this format, and it must be able to work over a
> > few months, and go into different years aswell. I'd appreciate any help
> > anyone can give. Thanks.
>
> Here's what the readme says on thew date() function. Your example could
> be calculated with
>
> date(B,19991010,S) - date(B,19990820,S)
>
> DATE()
> Usage: DATE([option],[date],[format])
> Returns the current date in the specified format. The default ('Normal')
> option returns the date in the form DD MMM YYYY, as in 20 Apr 1988.
> The options recognized are:
> Basedate -- the number of days since January 1, 0001
> Century -- the number of days since January 1 of the century
> Days -- the number of days since January 1 of the current year
> European -- the date in the form DD/MM/YY
> Internal -- internal system days
> Julian -- the date in the form YYDDD
> Month -- the current month (in mixed case)
> Normal -- the date in the form DD MMM YYYY
> Ordered -- the date in the form YY/MM/DD
> Sorted -- the date in the form YYYYMMDD
> USA -- the date in the form MM/DD/YY
> Weekday -- the day of the week (in mixed case)
> These options can be shortened to just the first character.
>
> In addition, the DATE() function now accepts optional second and third
> arguments to supply the date either in the form of internal system days
> or in the 'sorted' form YYYYMMDD. The second argument is an integer
> specifying either system days (the default) or a sorted date; the third
> argument specifies the form of the date and can be either 'I' or 'S'.
> The current date in system days can be retrieved using DATE('Internal').
>
> Examples:
> say date() ==> 20 Apr 1988
> say date('M') ==> April
> say date(s) ==> 19880420
> say date('s',date('i')+21) ==> 19890609
> say date('w',19890609,'S') ==> Friday

Hi Neil,

Which version of the Amiga OS introduced the changes ? What other ANSI
Standard features were introduced at the same time ? eg.
- Similar conversion capabilities for TIME
- CHANGESTR and COUNTSTR builtins
- ADDRESS env WITH ....
- Suberror messages

>
>
> Neil
> --
> Neil Bothwick - New Media Editor, Amiga Active Magazine
> Connected via Wirenet, The UK's first Amiga-only internet access provider
> http://www.wire.net.uk
> --
> Time for a diet! -- [NO FLABBIER].
>
> > ARexx mailing list - No flames, no overquoting, no crossposting. Unsubscribe: Blank mail to mailto:arexx-unsubscribe@onelist.com
>

Cheers, Mark
---------------------------------------------------------------------------
* Mark Hessling, M.Hessling@qut.edu.au http://www.lightlink.com/hessling/
* Author of THE; a Free XEDIT/KEDIT editor, Rexx/SQL, Rexx/Curses, Rexx/Wrapper
* Maintainer of PDCurses: Public Domain Curses and, Regina Rexx interpreter
* Use Rexx? join the Rexx Language Association: http://www.rexxla.org

--------------------------- ONElist Sponsor ----------------------------

??? Computer Questions ==> Free Answers From Live Experts ! ! !
go to EXPERTCITY.COM
<a href=" http://clickme.onelist.com/ad/expertcity15 ">Click Here</a>

------------------------------------------------------------------------
ARexx mailing list - No flames, no overquoting, no crossposting. Unsubscribe: Blank mail to mailto:arexx-unsubscribe@onelist.com