Re: Standard library - date and time
- Posted by Julio C. Galaret Viera <galaret at ?dinet.com.uy> Apr 22, 2008
- 1080 views
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