[Quickfix-developers] Re: WeeklySession patch, getWeekDay() patch
Brought to you by:
orenmnero
|
From: Caleb E. <cal...@gm...> - 2005-10-03 18:02:21
|
On 10/3/05, H. Steuer <st...@un...> wrote: > > anyways, i will patch my devel-version with your diff. did you get a > chance to take a look at the other patches regarding "WeeklySession"? I'll leave that one for Oren :-) IMHO the current way of specifying session start/end times could stand to b= e > refactored. This seems to be an area of frequent enhancement requests (an= d > bugs) and I believe a rethink is warranted. I'm not sure what the *right* > design would look like, but I think the current one isn't as configurable= or > extensible as it could be. > Off the top of my head, I think there should be a session "duration" (e.g. some number of days, weeks, months, etc) coupled with a start specifer (e.g= . Weekly + Monday, Monthly + 15th of the month). This would be used to determine when to reset the session. The default would be a day-long sessio= n that begins at midnight local time. Separate from this there should be an "hours of operation" specification which determines what time of day the session will be active and accept messages. This would default to 24 hour operation. It might be a good idea to look at ISO 8601 which describes date and time format specifications and includes time periods and durations: http://en.wikipedia.org/wiki/ISO_8601 Some examples: # A one-day long session that is valid from 8 am to 4 pm local time SessionDuration =3D P1D SessionTime =3D 8:00/16:00 # A day-long session that implicitly resets at midnight local time SessionDuration =3D P1D # A day-long session that resets at midnight Zulu SessionTime =3D 0:00Z/0:00Z # A month-long session that resets on the first of the month at midnight local time. # I'm not sure how to specify "the first of the month" in ISO-8601 format without # some specific start date SessionDuration =3D 2005-01-01/P1M SessionTime =3D 8:00/16:00 # A week long session, resetting on Tuesdays. As above, not sure how to # specify an arbitrary "Tuesday" date. SessionDuration =3D 2005-10-04/P1W SessionTime =3D 8:00/16:00 -- Caleb Epstein caleb dot epstein at gmail dot com |