docs: display last canary publish date in human-readable format (#7367)

This commit is contained in:
Joshua Chen 2022-05-07 20:17:58 +08:00 committed by GitHub
parent 5bc50ff71f
commit 77fa3d1470
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -118,7 +118,7 @@ export function PublishTime(): JSX.Element | null {
return null;
}
return (
<Translate values={{time: <code>{time}</code>}}>
<Translate values={{time: <b>{new Date(time).toLocaleString()}</b>}}>
{
"The latest canary version that's available on npm is published at {time}."
}