Function dateBeforeDays

  • Gives date before a certain number of days in the given format

    Parameters

    • days: number = 90

      number of days

    • dateSeparator: SeparatorType = "/"

      separator for the date

    • dateFormat: DateFormatType = "ymd"

      format of date ymd | dmy

    • time: boolean = false

      append time to the date

    Returns {
        from: string;
        to: string;
    }

    to date and from date in the given format

    • from: string
    • to: string