[Bioperl-l] Bio::Seq::GenEMBLI proposal

Matthew Pocock mrp@sanger.ac.uk
Mon, 18 Dec 2000 16:19:43 +0000

Paul Gordon wrote:

> > > >   (b) should date's be formatted strings or something else? (if so, what?)
> > >
> > > In my experience, the best format for dates is the number of seconds since
> > > the epoch (as is returned by time).  No possible ambiguities, plus
> > > functions in Perl to get the desired fields from it (localtime & gmtime).
> > > Compact too, with no need for structures and references.
> > The data format is mangled VMS, to the nearest day in EMBL. (No idea what
> > it is in GenBank). We need to handle, robustly, this sort of accuracy of
> > dates. We could claim the day is the 1st second at 12am and use unix time
> > (second since epoch).... it is going to confuse the new users...
> Date rounding shouldn't be too confusing...
> I think new users are likely to be familiar with the time and localtime
> commands, or at least have them in the camel book.  If a new date class is
> created, users will have to depend on the perldocs for that new class,
> which may be a little harded.  If the plan is to go the object route,
> at least there are good ones around that could probably be reused, such as
> DateTime::Precise which has some nice parsing.

Could you bless a scalar ref to a date epoch number into a date package? Then you
can easily add accessor methods like day, month, year without users needing to know
how the date is actualy stored.

> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l