Re: Proposed new package: Time.
| From: | Leandro Lucarella | Date: | Fri, 21 Feb 2003 13:41:54 +0000 |
| Subject: | Re: Proposed new package: Time. | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-13549@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:26 me escribiste:
> On Fri, 21 Feb 2003 10:18:26 -0300
> Leandro Lucarella <luca@llucax.hn.org> wrote:
>
>
> > I don't think so. I need just to operate times, if I use a Date_Time
> > class is an useless overhead. I thought maybe we can add a
> > Date_DateTime package or so to mix both.
> > Another reason is (even when now it just works with 24 hs) I want this
> > class to support "infinite" hours, say "The proccess takes 78:40:23
> > hours" or so, this has no sense in a Date_Time class.
> > That's why I proposed to be a "root level" class and don't put it on
> > Date subdirectory.
> > I want to add a 24hs flag to this class so it can be safe to mix it
> > with Date to make a Date_Time class.
>
> If I understand well, this package is a time span manager ? A time time
I'm sorry about my english but I don't know what a "time span manager"
is.
> span should be defined in days, hours, mins and secs, with different
> methods to get the span value in h:m:s, m:s, or simply seconds.
I think I understand what you mean. Is something like this, but simpler,
if you continue, you can add months and years too :)
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.
> Besides that, a timespan is in most of cases, used with a date, and/or a
> timezone. For this reason, imho, it is far better to get the whole stuff
> in one package. Else two packages will be needed, the Time_Span, and
> Date_Time, which provide a bridge between Date and Time, oooch, this is
> overdesign/head ;-))
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).
- --
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
- ------------------------------------------------------------------------
Cada poema es único. En cada obra late, con mayor o menor grado, toda la
poesía. Cada lector busca algo en el poema. Y no es insólito que lo encuentre:
Ya lo llevaba dentro.
-- Octavio Paz. (1914-1998) Escritor mexicano.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+ViyiSwIP4LCLT7IRAkZmAKCvPjFV+5pCe5K7w0PLRVXjYzsHTACePkel
ruJKR46DqWk2IAkjJNABWaU=
=kINi
-----END PGP SIGNATURE-----