chore: remove old filters, hardcoded types, old post status from view

This commit is contained in:
Cory Dransfeldt 2024-10-13 15:51:27 -07:00
parent ffea333d55
commit 76a172bb74
No known key found for this signature in database
15 changed files with 15 additions and 48 deletions

View file

@ -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']