That depends. Some detention centers give extra credit for good behavior or if they're considered for the trustee list. If your friend spent time prior to the sentencing then he might get credit for that time, as well. He should talk to the jail administrators to investigate these options.