{
  "id": "uilib/components/date-format",
  "name": "DateFormat",
  "description": "A ready to use DNB date formatter.",
  "group": "components",
  "slug": "/uilib/components/date-format/",
  "props": [
    {
      "name": "value",
      "doc": "The date that will be formatted.",
      "type": [
        "Date",
        "string"
      ],
      "status": "optional",
      "defaultValue": null
    },
    {
      "name": "dateStyle",
      "doc": "Defines the style used to format the date. Also affects duration formatting when using ISO 8601 duration strings. Defaults to `long`.",
      "type": [
        "long",
        "medium",
        "short",
        "full"
      ],
      "status": "optional",
      "defaultValue": null
    },
    {
      "name": "relativeTime",
      "doc": "If set to `true`, actual dates will be formatted as relative time (e.g., \"2 hours ago\"). ISO 8601 duration strings (e.g., \"PT1H\") are automatically detected and formatted without this prop. Defaults to `false`.",
      "type": "boolean",
      "status": "optional",
      "defaultValue": null
    },
    {
      "name": "relativeTimeReference",
      "doc": "A function that returns a Date object to use as the reference point for relative time calculations. If not provided, the current time is used.",
      "type": "function",
      "status": "optional",
      "defaultValue": null
    },
    {
      "name": "locale",
      "doc": "A string in [Intl.DateTimeFormat locale](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument) format. Duration formatting supports all locales using the browser's built-in internationalization. Defaults to `nb-NO`.",
      "type": "string",
      "status": "optional",
      "defaultValue": null
    },
    {
      "name": "skeleton",
      "doc": "If set to `true`, an overlaying skeleton with animation will be shown.",
      "type": "boolean",
      "status": "optional",
      "defaultValue": null
    }
  ],
  "events": [],
  "related": [
    "Space"
  ],
  "checksum": "3a17b0c3f601463268e5fbcdcbc35464940d526e523992d872a604a7835462af",
  "source": {
    "repo": "https://github.com/dnbexperience/eufemia",
    "file": "packages/dnb-eufemia/src/components/date-format/DateFormat.tsx",
    "permalink": "https://github.com/dnbexperience/eufemia/blob/main/packages/dnb-eufemia/src/components/date-format/DateFormat.tsx"
  },
  "sources": {
    "entry": {
      "local": "src/docs/uilib/components/date-format.mdx",
      "public": "https://5ecbdb78.eufemia-e25.pages.dev/uilib/components/date-format/"
    },
    "props": {
      "local": "src/docs/uilib/components/date-format/properties.mdx",
      "public": "https://5ecbdb78.eufemia-e25.pages.dev/uilib/components/date-format/properties/"
    },
    "events": null,
    "demos": {
      "local": "src/docs/uilib/components/date-format/demos.mdx",
      "public": "https://5ecbdb78.eufemia-e25.pages.dev/uilib/components/date-format/demos/"
    }
  },
  "version": "0.0.0-development",
  "generatedAt": "2025-12-23T13:39:32.994Z",
  "schemaVersion": 1
}
