Re: Standard library - date and time

new topic     » goto parent     » topic index » view thread      » older message » newer message

c.k.lester wrote:
> 
> Jeremy Cowgar wrote:
> > c.k.lester wrote:
> > > I don't think I'd have a problem with any of these changes if there were
> > > increases in speed and ease-of-use/utility. You would probably need to
> > > emulate the old date() and time() functions (in something like old_date()
> > > and
> > > old_time()) so dependent code could be easily modified.
> > I wouldn't get rid of the current date() function. This would just be in
> > addition
> > to the date() function.
> 
> Well, it might be a change for the better to have
> 
> date() - returns date {yr,mo,da}
> time() - returns current system time {hh,mm,ss,ms}
> nowDateTime() - how date() works now
> etime() - returns elapsed time (emulates current time() behavior)
> 
> The above would be added to the interpreter. The following would be in a
> library.
> 
> datetime() - returns {date(),time()} (this is redundant so I would put it in
> a library)
> +all other date/time functions
> 
> Why not?

I think the name "nowDateTime()" is redundant. I suggest "now()" as in other
languages.

JG

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu