Fixing work duration factory for transitions between days