Without knowing the specific penal code section it is difficult to determine what the credit rule is specifically. He should ask his attorney.
The response above is not intended as legal advice since it’s impracticable to provide thorough, accurate advice based upon the query without additional details. It is highly recommended that one should seek advice from a criminal defense attorney licensed in your jurisdiction by setting up a confidential meeting. Moreover, this response does not constitute the creation of an attorney-client relationship since this message is not a confidential communication because it was posted on a public website, thereby publicly disclosing the information, which is another reason to setup a confidential meeting with an attorney.
He will get credit for the 1 year in custody towards the 6 year sentence. If he is offered a 6-year sentence on a 186.22(b) gang enhancement, it is likely a half-time sentence because the gang enhancements that carry sentences below 6 years are all serious, not violent, and thus would carry a half-time sentence as opposed to an 85% sentence. But, as previously stated, an attorney would need to know the exact code section to give to completely accurate advice.
If you are looking for a second opinion on his case, you may want to consult a private attorney in your area and get a consultation to make sure he's getting proper representation.