code: public static boolean isValid(@Nullable final String dayOpeningHours) {
          if (dayOpeningHours == null) {
              return true;
          }
          final int p = dayOpeningHours.indexOf(' ');
          if (p < 0) {
              return false;
          }
          final String dayOfTheWeekStr = dayOpeningHours.substring(0, p);
          final String hourRangesStr = dayOpeningHours.substring(p + 1);
          return DayOfTheWeek.isValid(dayOfTheWeekStr) && HourRanges.isValid(hourRangesStr);
      }
docs: Verifies if the string can be converted into an instance of this class.
  
  @param dayOpeningHours
  String to test.
  
  @return {@literal true} if the string is valid, else {@literal false}.