WFLY-2881: fixes computation of next day of week
Merge pull request #6098 from emmartins/WFLY-2881

WFLY-2881: fixes computation of next day of week