Re: XML format for calendars
Roberto Perez <[email protected]> 09 Dec 2002 22:50:38 +0000
| Newsgroups | gmane.comp.gnome.apps.mr-project.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 2002-12-09 at 11:36, Mikael Hallendal wrote: > Hi! > > Going to start adding support for reading/writing the calendar data that > me and Richard has been implementing lately. > > I was thinking something like this: > > > <calendars> > <day-types> > <!-- Day types are project wide --> > <day-type id="1" name="Work day" description="A working day"> > <interval start="08.30" end="11.30"/> > <interval start="12.30" end="17.30"/> > </day-type> > <day-type id="2" name="Nonwork day" description="A nonworking day"/> > <day-type id="3" name="My day type" description="I'm sleep late"> > <interval start="10.00" end="13.00"/> > <interval start="13.30" end="18.30"/> > </day-type> > </day-types> > > <calendar name="Base calendar"> > <!-- Set the default week --> > <default-week mon="1" tue="1" wed="1" thu="1" fri="1" > sat="2" sun="2"/> > <day-types> > <!-- Override day types --> > <day-type id="1"> > <!-- Make the working day start later and have shorter lunch --> > <interval start="09.00" end="12.00"/> > <interval start="12.30" end="17.30"/> > </day-type> > </day-types> > <days> > <!-- Override specific dates --> > <day date="20021202" type="day-type">2</day> > <day date="20021203" type="custom"> > <interval start="09.30" end="12.30"/> > <interval start="13.00" end="17.00"/> > </day> > </days> > > <calendar name="My own calendar"> > <!-- Derived calendar, days not overridden will be read > from Base --> > <default-week mon="1" tue="1" wed="1" thu="3" fri="3" > sat="2" sun="2"/> > </calendar> > </calendar> > </calendars> > > What we have done is that you define a number of day types, these types > have a name, a description and a set of default intervals. The default > intervals can later be overridden in the calendars. > > All time is thought of as non-working time and all inetervals define > working time. > > In the default week you define what day types the days of the week > should have, the default week can then be overridden in a derived > calendar. > > The custom day type is to be able to just say "I want to change that day > without having to define a new day type for doing so"... > > So, comments please. > > Regards, > Mikael Hallendal Hi! I think that it is a good design but i have a question. I dont know exactly which are the puposes of calendar but, wouldn't it be a good idea to include who is working in each interval ? <interval start="10.00" end="13.00" workers="Sandy, John"> Regards Roberto. -- Roberto Perez <[email protected]>