Why is it not working? How have you created the Calendar object you're getting the weekday from?
Also, don't assume weekdays are 1-based or 0-based. Instead, use the constants to convert:
Since Calendar.SUNDAY is guaranteed to be the lowest of these values (by the API), subtracting it from the weekday will guarantee a 0-based weekday.
It's even better to just always compare with the constants like Calendar.FRIDAY. The only reason you'd want to use the above approach is when using the day index as array indexes, where you want absolute guarantees that it is 0-based.
Please be careful though when using DateFormatSymbols. The arrays it returns will only work with the constants; there are often empty values at index 0 if the constants start at 1.