From: Doug F. <dou...@go...> - 2012-01-26 18:21:40
|
On Wed, Jan 25, 2012 at 10:58 AM, Markus Scherer <mar...@gm...> wrote: > On Tue, Jan 24, 2012 at 2:17 PM, Doug Felt <dou...@go...> wrote: >> >> CurrencyMetaInfo.CurrencyFilter withDate(Date date) >> Returns a copy of this filter, with from and to set to the given >> date. >> CurrencyMetaInfo.CurrencyFilter withRange(Date from, Date to) >> Returns a copy of this filter, with from and to set to the >> given dates. > > > -> withDateRange() (as discussed) Yes, it was changed, but I forgot to update the email. > -> please clarify (API docs) whether "to" is inclusive or exclusive, in both > data structures and API; I assume "from" is inclusive. This probably warrants a bit of discussion. The CurrencyInfo data represents dates as the first millisecond of the day, GMT (basically, set the year/month/day and clear all smaller fields on a calendar, and get the milliseconds). Since it represents the very start of the day, a time on that same day but even one millisecond later will be treated like the following day. So while 'to' is inclusive (the currency is in use on that day) a straight time comparison will appear as though it is exclusive for any time except the very start of the day. It's easy enough to explain, but if it isn't explained to you, it's unintuitive. I could jigger the data to adjust the 'to' dates to the last millisecond of the day. Probably just adding a fixed offset in millis is fine and not too much work. I suppose if any leap seconds occurred during the last day of use of a currency a few people might be inconvenienced, but I'm, um, willing to take that risk. Should I jigger the data? Or document the current behavior? Doug > > Otherwise LGTM > > markus > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > icu-design mailing list > icu...@li... > To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-design |