Want to show numbers of days ago say a blog was posted or house was listed. So that it says something like “posted 3 days ago” or “listed 5 days ago”. I know i need to do a date difference between today/current date and published date but really have no idea how to write this code in javascript. Anyone able to help?
Wow Anthony, thanks it almost works. It only displays for the first item and the rest has nothing to it. You can see in the attached image or see on the all-properties page: Webflow - ghlpropertyservices
Also because I am using the CMS and the published date would be dynamic, how do change the static “2019/12/01” and use a dynamic field
Thanks Anthony, not sure how to do a for loop function, an example will be helpful if you can please.
Regarding the custom field, when i use it this is what i get…see below. is it possible the format of the published date from needs to converted to similar to 2019/12/01?
You don’t even need embed for the current date, juste use a regular text field and inject the correctly formated date via your collection list as shown in the screen shot.