Skip to content

Date time

<ns-date-time>

Overview

A standardised way to show the date and time.

✨ This is an auto-generated AI summary of the ns-date-time's documentation. It may not be accurate. ✨

Takes an input of a standard date and/or time string YYYY-MM-DDTHH:MM and outputs it into the correct date and/or time format.

Examples

Guidance

Implementation

Placement

The ns-date-time component can be used in the following components:

  • <p>
  • <div>

Specification

Attributes

date
Property
date
Description
The date to display inline with British Gas tone of voice. The time part follows 24 hours format ending with am/pm. When using timezone as part of the date be cautious to consider British Summer Time.
Type
string
Default
hide-date
Property
hideDate
Description
The toggle to hide the date from display.
Type
boolean
Default
false
hide-time
Property
hideTime
Description
The toggle to hide the time from display.
Type
boolean
Default
false
hide-day
Property
hideDay
Description
The toggle to hide the day from the display.
Type
boolean
Default
false
hide-month
Property
hideMonth
Description
The toggle to hide the month from the display.
Type
boolean
Default
false
hide-year
Property
hideYear
Description
The toggle to hide the year from the display.
Type
boolean
Default
false
type
Property
type
Type
string
Default
standard

Last updated: