refactor: remove day from dates
All checks were successful
Deploy Blog / deploy (push) Successful in 1m57s
All checks were successful
Deploy Blog / deploy (push) Successful in 1m57s
This commit is contained in:
parent
2ce5898767
commit
899e3d8cb7
1 changed files with 2 additions and 2 deletions
|
|
@ -25,11 +25,11 @@ const days = [
|
||||||
|
|
||||||
const convertDate = (isoStamp: string) => {
|
const convertDate = (isoStamp: string) => {
|
||||||
const unixSeconds = new Date(isoStamp)
|
const unixSeconds = new Date(isoStamp)
|
||||||
const weekday = days[unixSeconds.getDay()]
|
// const weekday = days[unixSeconds.getDay()]
|
||||||
const day = unixSeconds.getDate()
|
const day = unixSeconds.getDate()
|
||||||
const month = months[unixSeconds.getMonth()]
|
const month = months[unixSeconds.getMonth()]
|
||||||
const year = unixSeconds.getFullYear()
|
const year = unixSeconds.getFullYear()
|
||||||
return `${weekday} ${day} ${month} ${year}`
|
return `${day} ${month} ${year}`
|
||||||
}
|
}
|
||||||
|
|
||||||
export { convertDate }
|
export { convertDate }
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue