Function daysSinceDate

  • Calculates the number of days that have passed since the given date.

    Parameters

    • date: number | Date

      The date from which to calculate the number of days passed.

    Returns number

    The number of days since the given date.

    Example

    new Date('2020-01-01');;
    //=> <date object>
    daysSinceDate(new Date('2020-01-01'));;
    //=> <number of days since 2020-01-01>

Generated using TypeDoc