diff options
author | SanJacobs | 2022-08-26 13:20:25 +0200 |
---|---|---|
committer | SanJacobs | 2022-08-26 13:20:25 +0200 |
commit | e1005fd4ace41de92fb9d652ce8005cb38e4ec00 (patch) | |
tree | 00a6c62fea61cf156bfdd64384b289fb59bc3618 /src/time.cpp | |
parent | d4488cd88486ae4aaeac20fc7397942c00f0e1bc (diff) | |
download | satscalc-e1005fd4ace41de92fb9d652ce8005cb38e4ec00.tar.gz satscalc-e1005fd4ace41de92fb9d652ce8005cb38e4ec00.tar.bz2 satscalc-e1005fd4ace41de92fb9d652ce8005cb38e4ec00.zip |
Fixed Easter mislocation bug
Diffstat (limited to 'src/time.cpp')
-rwxr-xr-x | src/time.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/time.cpp b/src/time.cpp index 15dd0ce..224a6f0 100755 --- a/src/time.cpp +++ b/src/time.cpp @@ -216,19 +216,19 @@ workday::workday(const moment& previous_wrap, if((each_block.start.day==25 || each_block.start.day==26) && each_block.start.month==12) each_block.upvalue(2, "Christmas"); moment easter = gaussEaster(each_block.start.year); - if(each_block.start.day == (easter-(delta){0,0,-3}).day && - each_block.start.month == (easter-(delta){0,0,-3}).month) each_block.upvalue(2, "Maundy Thursday"); - if(each_block.start.day == (easter-(delta){0,0,-2}).day && - each_block.start.month == (easter-(delta){0,0,-2}).month) each_block.upvalue(2, "Good Friday"); + if(each_block.start.day == (easter-(delta){0,0,3}).day && + each_block.start.month == (easter-(delta){0,0,3}).month) each_block.upvalue(2, "Maundy Thursday"); + if(each_block.start.day == (easter-(delta){0,0,2}).day && + each_block.start.month == (easter-(delta){0,0,2}).month) each_block.upvalue(2, "Good Friday"); if(each_block.start.day == easter.day && each_block.start.month == easter.month) each_block.upvalue(2, "Easter"); - if(each_block.start.day == (easter-(delta){0,0,1}).day && - each_block.start.month == (easter-(delta){0,0,1}).month) each_block.upvalue(2, "Easter"); - if(each_block.start.day == (easter-(delta){0,0,39}).day && - each_block.start.month == (easter-(delta){0,0,39}).month) each_block.upvalue(2, "Feast of the Ascension"); - if(each_block.start.day == (easter-(delta){0,0,49}).day && - each_block.start.month == (easter-(delta){0,0,49}).month) each_block.upvalue(2, "Pentecost"); - if(each_block.start.day == (easter-(delta){0,0,50}).day && - each_block.start.month == (easter-(delta){0,0,50}).month) each_block.upvalue(2, "Pentecost Monday"); + if(each_block.start.day == (easter+(delta){0,0,1}).day && + each_block.start.month == (easter+(delta){0,0,1}).month) each_block.upvalue(2, "Easter"); + if(each_block.start.day == (easter+(delta){0,0,39}).day && + each_block.start.month == (easter+(delta){0,0,39}).month) each_block.upvalue(2, "Feast of the Ascension"); + if(each_block.start.day == (easter+(delta){0,0,49}).day && + each_block.start.month == (easter+(delta){0,0,49}).month) each_block.upvalue(2, "Pentecost"); + if(each_block.start.day == (easter+(delta){0,0,50}).day && + each_block.start.month == (easter+(delta){0,0,50}).month) each_block.upvalue(2, "Pentecost Monday"); } } |