Il 15/06/2012 10:13, D G ha scritto:
This all started as 'now + n days', so the __timeAdd methods works on
a now + something manner.
New proposal:
__timeAdd(format, number*, m|h|d|w|M|y**, parseString, parseFormat, variable)
where parseString is the string to be parsed into a date object and
ParseFormat is the format of the string to be parsed.
I use to do that kind of things in Javascript, in a BSF pre or post processor.
It takes just few lines of code, according to what you want to do.
I'm keen to understand what would be the advantages of an integrated solution.
regards
Sergio
My criticism would be the growing number of (optional) parameters but
it's too easy to lose __Functions somewhere in a test. Don't like
using two functions to accomplish a task :)
Another would be requiring some knowledge of how Java parses data.
Though that should be reasonably trivial to learn for most strings.
Also, it would be quite easy to allow parseString to accept a
float/epoch time and work with that.
Thoughts?
Regards,
Daniel
--
In caso di erronea ricezione da parte di persona diversa, siete pregati di eliminare il messaggio e i suoi allegati in modo
definitivo dai vostri archivi e di volercelo comunicare immediatamente restituendoci il messaggio via e-mail al seguente
[email protected] <mailto:[email protected]>
L’interessato può, inoltre, esercitare tutti i diritti di accesso sui propri dati previsti dal decreto 196/2003, tra i quali i
diritti di rettifica, aggiornamento e cancellazione, inviando un messaggio all’indirizzo:[email protected]
<mailto:[email protected]>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]