class DateUtil {

    public static Instant truncatedToWeek(Instant date) {
        notNull(date, "date can't be null");
        final DayOfWeek dow = ZonedDateTime.ofInstant(date, ZoneOffset.UTC).getDayOfWeek();
        return truncatedToDay(date).minus(Duration.ofDays(dow.getValue() % 7));
    }

}