Re: operatingDay [message #659 is a reply to message #656] |
Wed, 14 September 2005 18:42 |
Joachim.Rubröder
Messages: 33 Registered: September 2004
|
Member |
|
|
Hello Martin,
- X = holiday : if X is listed as a <holiday> entry
- X = afterHoliday : if X != holiday, X-1 = holiday.
- X = beforeHoliday : if X and X-1 != holiday, X+1 = holiday.
- X = afterAfterHoliday: if X and X-1 and X+1 != holiday, X-2 = holiday.
- X = regularday : if X and X-1 and X+1 and X-2 != holiday.
seems to be a correct definition.
Now to your Problem with "holiday-before-holiday" and
"holiday-not-before-holiday":
The 25.12. is both a holiday and a beforeHoliday but holiday is stronger.
If you like to define a train driving on all holidays but not on the
holidays followed by other holidays, you have to use:
<operatingDay operatingCode="1111111" dayType="holiday"/> (on all
holidays)
<special type="exclude" date="2005-12-24"/> (but not on 25.12.)
Your "free-day before free-day" should look like:
<service serviceID="free-day before free-day" description="(includes
Saturdays and 1st Christmas day...)" startDate="2006-01-01"
endDate="2008-01-01">
<operatingDay operatingCode="0000011" dayType="beforeHoliday"/>
(all Saturdays and Sundays before Holidays)
<operatingDay operatingCode="0000010" dayType="regularday"/> (all
regular Saturdays)
<special type="include" date="2005-12-24"/> (also on holiday
25.12., even on Mo-Fr)
</service>
Maybe you should just skip all the <holiday> definitions and restrict
yourself to only using explicit bitmasks?
Now to your second question. Every day is either a holiday (if listed as
holiday) or a regularday.
If a service has no other operatingDay defined - that's it.
If a service has a beforeHoliday definiton, then every day can be (for
this sevice) either holiday or beforeHoliday or regularday.
Kind regards,
Joachim
|
|
|