- updated proper displaying of dates with leading zero;
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
const getDateFromISOstring = (value, options = {}) => {
|
const getDateFromISOstring = (
|
||||||
const optionsMerged = options || { day: '2-digit', month: '2-digit', year: 'numeric', hour12: false }
|
value,
|
||||||
return value ? Intl.DateTimeFormat('it-IT', optionsMerged).format(new Date(value)) : value;
|
options = {
|
||||||
|
day: '2-digit', month: '2-digit', year: 'numeric', hour12: false
|
||||||
|
}) => {
|
||||||
|
return value ? Intl.DateTimeFormat('it-IT', options).format(new Date(value)) : value;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default getDateFromISOstring;
|
export default getDateFromISOstring;
|
||||||
Reference in New Issue
Block a user