Re: prefixes and namespaces?

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

Jeremy Cowgar wrote:
> 
> Julio C. Galaret Viera wrote:
> > 
> > It would be enough to have an ADD function where you set the interval
> > (year, month, week, day...):
> > For example,
> > - add 30 days: ..._ADD(DAY, 30, mydate or mydatetime)
> > - add 1 week:  ..._ADD(WEEK, 1, mydate or mydatetime)

<snip>
 
> As for adding weeks, months, etc... That gets very difficult because what is
> a month, for instance? The average is 4.3 weeks, but that's an average. I
> think
> in most programs you don't wind up adding in intervals of weeks, months,
> etc...
> It's possible. But you could use, if you wish, add_days(7*4.3...) and add
> months,
> weeks, or whatever you wanted.
> 
> So, we did try to make things as minimal as possible by adding just two
> functions,
> add days and add seconds, as to work well with manipulating times and dates.

I agree with Julio.  A single add would be better.  It should be documented
that only fixed units are allowed (YEAR, DAY, WEEK, HOUR, MINUTE, SECOND).

Matt

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

Search



Quick Links

User menu

Not signed in.

Misc Menu