samuel.murphy
10/1/2006 6:08:00 PM
M. Edward (Ed) Borasky wrote:
> David Vallner wrote:
> > Dirk Lüsebrink wrote:
> >> i could not think of any way to include the ':' character in a DSL, so
> >> that i could write:
> >>
> >> from 10:30 to 11:30
> >>
> >> instead
> >>
> >> from "10:30" to "11:30"
> >>
> >> I mean, it is not that bad, but still.
> >> dirk
> >>
> >> ps.: of course i can always parse it,
> >>
> >>
> >
> > I'd just use the 'from 1030 to 1130' notation - hopefully you don't need
> > to use both time values and integers in the same context.
> >
>
> I'd recommend *not* using either integers or floating point (from 10.30
> to 11.30) "type puns". The double-quotes are awkward, true, but then
> some magic with "strptime" gives you real workable values for time
> computations.
Not only that, re-think the problem and remove *data* from the code.
Put
it in a config file (where quotes would not be necessary), a database,
or an include file of some kind.