This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const timeSince = ( date: string ) => { | |
const baseDate = new Date(date) | |
const seconds = Math.floor(( new Date().getTime() - baseDate.getTime() ) / 1000); | |
let interval = seconds / 31536000; |