Skip to content

MCPD date presentation control

Implement a new <McpdDate presentation control that receives a "date" in MCPD format (YYYYMMDD) and presents this value as DD MMMM YYYY:

20180821 -> 21 August 2018
20180000 -> 2018
2018---- -> 2018

MCPD dates

The general format is YYYYMMDD and unknown values may be represented as either - or 0 (for month and day).

This presentational component should have no internal state and should parse the year, month and day data from the value provide (as string) and then render the temporal information.

Expected use

<McpdDate value={ accession.acqusitionDate } />

Use this component to render acquisition date and collecting date of accessions.

Edited by Matija Obreza
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information