chore: remove old filters, hardcoded types, old post status from view
This commit is contained in:
parent
ffea333d55
commit
76a172bb74
15 changed files with 15 additions and 48 deletions
|
@ -1,20 +1,4 @@
|
|||
import { DateTime } from 'luxon'
|
||||
|
||||
export default {
|
||||
isoDateOnly: (date, separator) => {
|
||||
let d = new Date(date)
|
||||
let month = '' + (d.getMonth() + 1)
|
||||
let day = '' + d.getDate()
|
||||
let year = d.getFullYear()
|
||||
|
||||
if (month.length < 2) month = '0' + month
|
||||
if (day.length < 2) day = '0' + day
|
||||
|
||||
return [year, month, day].join(separator)
|
||||
},
|
||||
oldPost: (date) => {
|
||||
return DateTime.now().diff(DateTime.fromJSDate(new Date(date)), 'years').years > 3
|
||||
},
|
||||
stringToRFC822Date: (dateString) => {
|
||||
const date = new Date(Date.parse(dateString))
|
||||
const dayStrings = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
|
||||
|
|
Reference in a new issue