calculate a transposed matrix based on input
count each day of rest (Sat. and Sun.) starting from the initial date to final date