static DateValue nextWeekStart ( DateValue d , Weekday wkst ) { DTBuilder builder = new DTBuilder ( d ) ; builder . day += ( 7 - ( ( 7 + ( Weekday . valueOf ( d ) . javaDayNum - wkst . javaDayNum ) ) % 7 ) ) % 7 ; return builder . toDate ( ) ; }
the earliest day on or after d that falls on wkst .