[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Date/time package
> It just occurred to me that it might be useful if there was a
> "current-chronology" that behaves like "current-input-port", which
> is then parameterizable (maybe call-with-chronology).
> I'm not sure, it might also be overkill since you can't really do
> anything special to chronologies except query them. Just wanted to
> put the idea out there to see what others think.
Here's a use case for that: I'm writing a program that wants to deal
with users in different time zones (maybe a web server or something
similar). My own program knows about which users are in which time
zone, and adjusts accordingly. But I'd also like to use a library for
pretty formatting, which unfortunately wasn't written with this case
in mind. I have no way to pass a chronology to this library. But if I
could use call-with-chronology, I wouldn't have to worry about that.
More generally, this lets people customize chronologies in functions
whose creators didn't think that users would want to change
chronologies. This seems like a common case, because most programs
only operate in one time zone at a time, but a few need to deal with
lots of time zones. So I would expect that lots of libraries wouldn't
let the user change the time zone, and a few users would have problems
because of this.
Scheme-reports mailing list