Debian Codegraph @

node/@patternfly/react-core/src/components/Timestamp/examples/TimestampBasicFormats.tsx

raw
1 import { Timestamp, TimestampFormat } from '@patternfly/react-core';
2
3 export const TimestampBasicFormats: React.FunctionComponent = () => {
4 const currentDate = new Date('2025-04-21T23:35:25');
5
6 return (
7 <>
8 <Timestamp date={currentDate} dateFormat={TimestampFormat.full} timeFormat={TimestampFormat.full} />
9 <br />
10 <br />
11 <Timestamp date={currentDate} dateFormat={TimestampFormat.full} />
12 <br />
13 <br />
14 <Timestamp date={currentDate} timeFormat={TimestampFormat.full} />
15 <br />
16 <br />
17 <Timestamp
18 date={currentDate}
19 dateFormat={TimestampFormat.medium}
20 timeFormat={TimestampFormat.short}
21 displaySuffix="US Eastern"
22 />
23 </>
24 );
25 };