code: @Nullable
      public static DayOfTheWeek valueOf(@Nullable final DayOfWeek dayOfWeek) {
          if (dayOfWeek == null) {
              return null;
          }
          final int value = dayOfWeek.getValue();
          for (final DayOfTheWeek dow : ALL) {
              if (value == dow.id) {
                  return dow;
              }
          }
          throw new IllegalArgumentException("Unknown day week: " + dayOfWeek);
      }
docs: Converts the instance into java time instance.
  
  @return Day of week.