|
@@ -1104,6 +1104,7 @@ int check_min_unit(tmrec_t *_trp, ac_tm_t *_atp, tr_res_t *_tsw)
|
|
int check_byxxx(tmrec_t *_trp, ac_tm_t *_atp)
|
|
int check_byxxx(tmrec_t *_trp, ac_tm_t *_atp)
|
|
{
|
|
{
|
|
int i;
|
|
int i;
|
|
|
|
+ int v;
|
|
ac_maxval_t *_amp = NULL;
|
|
ac_maxval_t *_amp = NULL;
|
|
if(!_trp || !_atp)
|
|
if(!_trp || !_atp)
|
|
return REC_ERR;
|
|
return REC_ERR;
|
|
@@ -1117,10 +1118,12 @@ int check_byxxx(tmrec_t *_trp, ac_tm_t *_atp)
|
|
|
|
|
|
if(_trp->bymonth) {
|
|
if(_trp->bymonth) {
|
|
for(i = 0; i < _trp->bymonth->nr; i++) {
|
|
for(i = 0; i < _trp->bymonth->nr; i++) {
|
|
- if(_atp->t.tm_mon
|
|
|
|
- == ((_trp->bymonth->xxx[i] - 1) * _trp->bymonth->req[i]
|
|
|
|
- + 12)
|
|
|
|
- % 12)
|
|
|
|
|
|
+ if(_trp->bymonth->req[i] < 0) {
|
|
|
|
+ v = 12 - _trp->bymonth->xxx[i];
|
|
|
|
+ } else {
|
|
|
|
+ v = _trp->bymonth->xxx[i] - 1;
|
|
|
|
+ }
|
|
|
|
+ if(_atp->t.tm_mon == v)
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
if(i >= _trp->bymonth->nr)
|
|
if(i >= _trp->bymonth->nr)
|