Re: datetime functions

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

Jeremy Cowgar wrote:
> 
> Ok, Since there was much discussion about datetime, I'm starting this thread.
> 
> In SVN are the new datetime functions. I have remove datetime_compare,
> datetime_add_days,
> datetime_add_seconds. I have removed datetime_ prefix. I have added add and
> subtract functions that work on intervals. SECONDS, MINUTES, HOURS, DAYS,
> WEEKS
> are implemented. MONTHS and YEARS exist but do nothing right now
> 
> }}}
<eucode>
> include datetime.e as d
> datetime dt1, dt2
> dt1 = d:now()
> dt2 = d:add(dt1, 12, DAYS)
> dt2 = d:subtract(dt1, 15, WEEKS)
> --- etc...
> </eucode>
{{{

> 
> Look good?

I don't want to reopen a can of worms but I've been following the discussion and
must have missed where it was agreed to drop the prefix. It just seems to me that
add() is rather ambiguous, there is already the precedent set in EU for the edb
commands of having a db_ prefix, so for the datetime functions to look integrated
with the core commands I feel it should have a dt_ prefix

PeteS

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

Search



Quick Links

User menu

Not signed in.

Misc Menu