Constructors

Methods

Constructors

  • Creates a new RFCDate instance using the provided input. If a string is used then in must be in the format YYYY-MM-DD.

    Parameters

    • date: string | Date

      A Date object or a date string in YYYY-MM-DD format

    Returns RFCDate

    new RFCDate("2022-01-01")
    
    new RFCDate(new Date())
    

Methods