private static int dayToUtilDay ( int day ) { switch ( day ) { case EventRecurrence . SU : return Calendar . SUNDAY ; case EventRecurrence . MO : return Calendar . MONDAY ; case EventRecurrence . TU : return Calendar . TUESDAY ; case EventRecurrence . WE : return Calendar . WEDNESDAY ; case EventRecurrence . TH : return Calendar . THURSDAY ; case EventRecurrence . FR : return Calendar . FRIDAY ; case EventRecurrence . SA : return Calendar . SATURDAY ; default : throw new IllegalArgumentException ( "bad day argument: " + day ) ; } }
Converts EventRecurrence s day of week to DateUtil s day of week .