diff --git a/src/utils.js b/src/utils.js index 7644e4b..b057bca 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1,5 +1,8 @@ const dateString = (date) => { + if (typeof(date) == "string") { + date = new Date(date); + } const ye = new Intl.DateTimeFormat('en', { year: 'numeric' }).format(date) const mo = new Intl.DateTimeFormat('en', { month: '2-digit' }).format(date) const da = new Intl.DateTimeFormat('en', { day: '2-digit' }).format(date)