def _freq_to_days(freq: str) -> float:
        """Converts a frequency to number of days required by Facebook Prophet

        Parameters
        ----------
        freq
            frequency string of the underlying TimeSeries's time index (pd.DateTimeIndex.freq_str)
        """

        # this regex extracts all digits from `freq`: exp: '30S' -> 30
        freq_times = re.findall(r"\d+", freq)
        freq_times = 1 if not freq_times else int(freq_times[0])

        # this regex extracts all characters and '-' from `freq` and then extracts left string from '-'
        # exp: 'W-SUN' -> 'W', '30S' -> 'S'
        freq = "".join(re.split("[^a-zA-Z-]*", freq)).split("-")[0]

        seconds_per_day = 86400
        days = 0
        if freq in ["A", "BA", "Y", "BY", "RE"] or freq.startswith((
            "A",
            "BA",
            "Y",
            "BY",
            "RE",
        )):  # year
            days = 365.25
        elif freq in ["Q", "BQ", "REQ"] or freq.startswith((
            "Q",
            "BQ",
            "REQ",
        )):  # quarter
            days = 3 * 30.4375
        elif freq in [
            "M",
            "BM",
            "CBM",
            "SM",
            "LWOM",
            "WOM",
        ] or freq.startswith(("M", "BME", "BS", "CBM", "SM", "LWOM", "WOM")):  # month
            days = 30.4375
        elif freq == "W" or freq.startswith("W-"):  # week
            days = 7.0
        elif freq in ["B", "C"]:  # business day
            days = 1 * 7 / 5
        elif freq in ["D"]:  # day
            days = 1.0
        else:
            # all freqs higher than "D" are lower case in pandas >= 2.2.0
            freq_lower = freq.lower()
            if freq_lower in ["h", "bh", "cbh"]:  # hour
                days = 1 / 24
            elif freq_lower in ["t", "min"]:  # minute
                days = 1 / (24 * 60)
            elif freq_lower in ["s"]:  # second
                days = 1 / seconds_per_day
            elif freq_lower in ["l", "ms"]:  # millisecond
                days = 1 / (seconds_per_day * 10**3)
            elif freq_lower in ["u", "us"]:  # microsecond
                days = 1 / (seconds_per_day * 10**6)
            elif freq_lower in ["n", "ns"]:  # nanosecond
                days = 1 / (seconds_per_day * 10**9)

        if not days:
            raise_log(
                ValueError(
                    f"freq {freq} not understood. Please report if you think this is in error."
                ),
                logger=logger,
            )
        return freq_times * days
Converts a frequency to number of days required by Facebook Prophet

        Parameters
        ----------
        freq
            frequency string of the underlying TimeSeries's time index (pd.DateTimeIndex.freq_str)
        
darts/models/forecasting/prophet_model.py