code: public static function dayStringToNumber($day)
      {
          $strippedDayValue = (str_replace(self::$numberSuffixes, '', $day));
          if (is_numeric($strippedDayValue)) {
              return (int) $strippedDayValue;
          }
  
          return $day;
      }
docs: Strips an ordinal froma numeric value.
  
  @param string $day Day number with an ordinal
  
  @return int|string The integer value with any ordinal stripped, or the original string argument if it isn't a valid numeric