As a perl user I welcome the effort of standardizing perl dates. It is
basically a good thing to do, I already tried to do such a thing with
Class::Date, and at that time, this module filled a demand for a good OO
date class. This module is used by quite a few users, but I developed it
mostly alone, no one has recognized the possibilities. It might be not
so good or not so accepted, I don't know.

I have checked the Date::ICal module, which addressed most of the issues
I have faced in the development of Class::Date. Although it does not
solve all of this, the module implementation is quite good, ideal for
a DateTime base class.

Why we need a standard date and time module for perl anyway?
The answers:
- To make it supported by the whole perl community, inclucing module
  developers. For example, I want to pass a date object to the DBI
  bind_param method without the need of converting it to string. I want
  DBI to parse it into the format, which the database-server
  understands. To achieve this, we just need to provide a good
  stringification and parser interface.
- To be usable by the perl community. Anyone who want to deal with dates
  could use this module for date calculation. This will be part of the
  common perl knowledge and will be offered by perlfaq4. To achieve
  this, we need to find a good API.

I agrees most of the things already mentioned in this thread, I don't
want to repeat them, however I want to emphasize the importance of the
stringification and parsing interface. It is the basic of
interoperability with other modules.

Some ideas, which can be borrowed from Class::Date:

- pluggable parsers
- Subclassability
- timezone-handling
- configurability with localizable variables
- exportable "datetime", "localdatetime", "gmdatetime" functions for
  short-cuts of the constructors.
- Object for an invalid date

Syntax proposals, which are besides the syntax of Date::ICal:

- $date + { year => 3 }
- $date + [ 3, 0, 0 ]

Szabó, Balázs (dLux)
--
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)

Reply via email to