This is my code so far that is set up for my wix page Date display.
$w.onReady( function () {
$w(“#dataset11”).onReady( () => {
$w(“#dataset1”).forEachItem( ($w) => {
const originalDate = $w(“#DATE”).text;
const newDate = originalDate.split(’ ‘).splice(0, 4).join(’ ‘);
$w(’#DATE’).text = newDate;
console.log('Time removed from Date/Time Stamp: New Date ’ + newDate);
});
});
});
What would i need to add the function to make it output the words like : “one day ago” ?
Integrating with wix would be amazing.
Best