Re: Proposed new package: Time.
| From: | Leandro Lucarella | Date: | Fri, 21 Feb 2003 14:04:52 +0000 |
| Subject: | Re: Proposed new package: Time. | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-13552@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Pierre-Alain Joye, el viernes 21 de febrero a las 14:56 me escribiste:
> On Fri, 21 Feb 2003 10:41:54 -0300
> Leandro Lucarella <luca@llucax.hn.org> wrote:
>
> > I'm sorry about my english but I don't know what a "time span manager"
> > is.
>
> A span represent a distance, in this case, a time distance, the span
> between 14:00 and 15:30:23 is 1:30:23.
That's what I thought, I didn't saw the relation to dates...
> > I think I understand what you mean. Is something like this, but
> > simpler, if you continue, you can add months and years too :)
>
> I do not think years/months should be added too, except if you define a
> default month/year length. Usually, the span is defined as
> days,hours,mins and seconds. For instance, you can take a look to the
Nice detail... :D
> different Date/Time packages in python, perl, or C/C++ APIs.
>
> > This is not the idea. The reason for this package is I want to count
> > worked hours, so the original class was made just for 24hs, but to
> > count time intervals, not to see what day/time is. I thought it could
> > be helpfull to add support for 24hs+ but just if other people need it
> > and if I doesn't means to add much complexity to the class.
>
> Let see, worked hours mean a list of time span, no ? If I work from 8:00
> to 12:00 and from 13:00 to 17:00, I got 2 timespan (worked hours), of
> 4:00:00. Is that not the same thing ?
Yep.
> > Mmm, I don't understand what Time Span is again? I thought is like
> > counting Time intervals?
> > Anyway, I think I can make the class to support 24hs+ and add some
> > methods like setFromDays(), setFromMonths(), setFromYears() (too much?
> > :) and toDays(), toMonths(), toYears().
> > But as with the other setFromXxx() and toXxx() methods, quantities are
> > float values (like 1.23 months and 0.12 years).
>
> hmm dunno if it is usefull to set values using this scheme, humans are
> not smart with decimal based time :), but it may be possible to add
> different set methods.
>
> +1 to add it to Date, with additionnals features if needed (see
> Wolfgang and Lukas posts).
What does it means to "add it to Date"? A class merge? I'm still not
happy with this, for me a time interval is not necesarly related to a
date.
- --
LUCA - Leandro Lucarella - Usando Debian GNU/Linux Sid - GNU Generation
- ------------------------------------------------------------------------
E-Mail / JID: luca@lugmen.org.ar
GPG Fingerprint: D9E1 4545 0F4B 7928 E82C 375D 4B02 0FE0 B08B 4FB2
GPG Key: gpg --keyserver pks.lugli.org.ar --recv-keys B08B4FB2
- ------------------------------------------------------------------------
Los militares cuentan demasiado con la fuerza, y los politicos cuentan
demasiado con la habilidad.
-- Tournier.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+VjIESwIP4LCLT7IRAuqUAJ4iWhEnv2BEz8okwKCwWn+k1/fJHQCeICjg
OgJx1orC4PjsywIW2Zdy6Uo=
=iKnh
-----END PGP SIGNATURE-----