Skip to content

Commit

Permalink
fix: change datetime attribute to a machine-readable value
Browse files Browse the repository at this point in the history
  • Loading branch information
ChengShi-1 committed Nov 8, 2024
1 parent 3f0a107 commit b5c62f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function FileDate({ date }: { date: FileDateModel }) {
<div>
<span>
{t(`table.date.${date.type}`)}{' '}
<time dateTime={DateHelper.toDisplayFormat(date.date)}>
<time dateTime={DateHelper.toISO8601Format(date.date)}>
{DateHelper.toDisplayFormat(date.date)}
</time>
</span>
Expand Down
6 changes: 1 addition & 5 deletions src/sections/file/file-embargo/FileEmbargoDate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ export function FileEmbargoDate({
<span>
{t(embargoTypeOfDate(embargo.isActive, datasetPublishingStatus))}{' '}
<time
dateTime={
format === 'YYYY-MM-DD'
? DateHelper.toISO8601Format(embargo.dateAvailable)
: DateHelper.toDisplayFormat(embargo.dateAvailable)
}
dateTime={DateHelper.toISO8601Format(embargo.dateAvailable)}
data-testid="embargo-date">
{format === 'YYYY-MM-DD'
? DateHelper.toISO8601Format(embargo.dateAvailable)
Expand Down

0 comments on commit b5c62f3

Please sign in to comment.