Drafts Script Reference
    Preparing search index...

    Function strftime

    • Format date using strftime format string. See strftime format reference for supported format strings.

      Example:

      // get current date time as year-month-date, e.g. 2026-01-03
      let s = strftime(new Date(), "%Y-%m-%d")

      Parameters

      • date: Date

        Date object to format.

      • format: string

        strftime format string.

      Returns string