🪄
Canvacard
  • 🥳Welcome
  • 🗂️Classes
    • 🎨Welcome / Leave
    • 🎮FortniteShop
    • 🎯Canvacard
    • 🎶Spotify
    • 🏆Rank
    • 🖋️Plugins
  • 🧰Utils
    • 🔧Abbreviate
    • 🖼️Canvas
    • 🕒Discord Time
    • ⚠️Error
    • 🏳️Flags
    • 🔍Format and Validate Hex
    • ⏰Format Time
    • 📏Format Variable
    • 📅Get Date or String
    • 🔍Icon
    • 🔢Is Number
    • 🔤Is String
    • 🖼️Parse Image
    • 📄Parse PNG
    • 📄Parse SVG
    • 🔽Shorten
    • ✂️Truncate Text
    • 👤Username
Powered by GitBook
On this page
  1. Utils

Get Date or String

getDateOrString ⇒ string

Gets a formatted date string or returns the input as is.

Kind: global variable Returns: string - The formatted date string or the original input.

Param
Type
Default
Description

dateInput

string | Date

The date to format. Can be a date string (ISO 8601) or a Date object.

createdTimestamp

number

A fallback timestamp to use if dateInput is undefined or null.

[localDateType]

string

"'en'"

The locale for the date format (default is English).

PreviousFormat VariableNextIcon

Last updated 7 months ago

🧰
📅