Generate working periods table