Removed restriction that workday (W) must not be holiday (H) too.

Updated rate-files(5): priority of days, U:^..., s/weekday/workday.
This commit is contained in:
tobiasb 2004-10-04 14:50:41 +00:00
parent 6774d9c4e6
commit 76d67818a5
3 changed files with 31 additions and 11 deletions

View File

@ -1,3 +1,8 @@
2004-10-04 Tobias Becker <tobiasb@isdn4linux.de>
* holiday.c (isDay): Removed restriction that workday (W) must not be
holiday (H) too. See rate-files(5) for order of priority.
2004-09-29 Tobias Becker <tobiasb@isdn4linux.de>
* tools.h (ignoreCLIP): New global variable, similiar ignoreCOLP.

View File

@ -1,4 +1,4 @@
/* $Id: holiday.c,v 1.18 2000/01/12 23:22:53 akool Exp $
/* $Id: holiday.c,v 1.19 2004/10/04 14:50:41 tobiasb Exp $
*
* Feiertagsberechnung
*
@ -19,6 +19,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: holiday.c,v $
* Revision 1.19 2004/10/04 14:50:41 tobiasb
* Removed restriction that workday (W) must not be holiday (H) too.
* Updated rate-files(5): priority of days, U:^..., s/weekday/workday.
*
* Revision 1.18 2000/01/12 23:22:53 akool
* - isdnlog/tools/holiday.c ... returns ERVERYDAY for '*'
* - FAQ/configure{,.in} ... test '==' => '='
@ -502,7 +506,7 @@ int isDay(struct tm *tm, bitfield mask, char **name)
return WEEKEND;
}
if ((mask & (1<<WORKDAY)) && day!=SATURDAY && day!=SUNDAY && !isHoliday(tm, NULL)) {
if ((mask & (1<<WORKDAY)) && day!=SATURDAY && day!=SUNDAY) {
if (name) *name=staticString("%s (%s)", Weekday[WORKDAY], Weekday[day]);
return WORKDAY;
}

View File

@ -1,6 +1,6 @@
'\" t
'\" ** above should format a table **
.\" CHECKIN $Date: 2004/01/11 15:16:11 $
.\" CHECKIN $Date: 2004/10/04 14:50:41 $
.TH rate-files 5 "@MANDATE@" -lt-
.SH NAME
rate-files \- Format of rate-files
@ -74,8 +74,16 @@ N:19440
.P
.B U:currencyfmt currency
.IP
e.g.
U:%.3f DEM
If the first char of
.I currencyfmt
is ^, the amount is multiplied by 100 before it is displayed
without leading ^.
.IP
e.g. (one of these, ¢ = cent)
.br
U:%.3f EUR
.br
U:^%.3f ¢
.P
.B X:num_wildcard = provider[zZone] [,...]
.IP
@ -301,8 +309,11 @@ are optional.
.I daylist
is
.BR day [ -day ][ ,... ]
and day is a daynumber (1=Mon, 2=Tue, ...) or W (weekday), E (weekend), H (holiday) or
and day is a daynumber (1=Mon, 2=Tue, ...) or
W (workday, Monday to Friday), E (weekend), H (holiday) or
* (everyday).
If more than one of these days match a given date, the following order of
priority (highest first) applies: H 7 .. 1 E W *.
.P
.I timelist
is
@ -347,7 +358,7 @@ after this charging is calculated in seconds interval.
.IP
T:W/18-8=0.30|1.2(60)/1 night
.IP
On weekday, night, charge is the bigger of 1.20 per minute or 0.30
On workdays, night, charge is the bigger of 1.20 per minute or 0.30
.IP
T:*/*=0.50/0,1(60)/1 always
.IP
@ -426,7 +437,7 @@ can be shortened as long as it remains definite.
.IP
EXAMPLE
.br
T:[-24.12.2003]W/*=0.08/60 weekdays
T:[-24.12.2003]W/*=0.08/60 on workdays
.br
T:[-24.12.2003]E,H/*=0.06 weekend
.br
@ -440,19 +451,19 @@ t:[01.01.2004]=[-24.12.]
.IP
This will be transformed into:
.IP
T:[-24.12.2003]W/*=0.08/60 weekdays
T:[-24.12.2003]W/*=0.08/60 on workdays
.br
T:[-24.12.2003]E,H/*=0.06/60 weekend
.br
T:[24.12.2003-25.12.2003]*/*=0.04/60 Christmas Eve
.br
T:[25.12.2003-31.12.2003]W/*=0.08/60 weekdays
T:[25.12.2003-31.12.2003]W/*=0.08/60 on workdays
.br
T:[25.12.2003-31.12.2003]E,H/*=0.06/60 weekend
.br
T:[31.12.2003-01.01.2004]=0.04/60 New Years' Eve
.br
T:[01.01.2004]W/*=0.08/60 weekdays
T:[01.01.2004]W/*=0.08/60 on workdays
.br
T:[01.01.2004]E,H/*=0.06/60 weekend
.SH SEE ALSO