A timestamp provides consistent formats for displaying date and time values.
Read more about Datetime in the PatternFly Elements Timestamp documentation
Load <pf-timestamp> via CDN:
<script src="https://jspm.dev/@patternfly/elements/pf-timestamp/pf-timestamp.js"></script>Or, if you are using NPM, install it
npm install @patternfly/elementsThen once installed, import it to your application:
import '@patternfly/elements/pf-timestamp/pf-timestamp.js';<pf-timestamp
date="Mon Jan 2 15:04:05 EST 2006"
date-format="long">
</pf-timestamp><pf-timestamp
date="Mon Jan 2 15:04:05 EST 2006"
date-format="full"
time-format="long">
</pf-timestamp>You can use any locale here.
<pf-timestamp
date="Mon Jan 2 15:04:05 EST 2006"
date-format="full"
time-format="long"
locale="en-GB">
</pf-timestamp><pf-timestamp
date="Mon Jan 2 15:04:05 EST 2006"
relative>
</pf-timestamp>