Paratii-Video / paratiisite

Up-to-date source code of our institutional website.
http://paratii.video
GNU General Public License v3.0
7 stars 5 forks source link

Countdown-to-launch on header banner of ATB site #166

Closed jrgarou closed 6 years ago

jrgarou commented 6 years ago

https://github.com/Paratii-Video/paratiisite/issues/148 Instead of doing a more complex counter @felipegaucho and I decided to do just a single banner line:

image image

I'm using Momentjs(http://momentjs.com/) to show the value in counter based in value https://github.com/Paratii-Video/paratiisite/blob/6d5b657d9907ba2241673c8a90842e3d7e36049d/src/around-the-block/app/data/data.php#L86-L89

moment("20111031", "YYYYMMDD").fromNow(); // 7 years ago
moment("20120620", "YYYYMMDD").fromNow(); // 6 years ago
moment().startOf('day').fromNow();        // 18 hours ago
moment().endOf('day').fromNow();          // in 6 hours
moment().startOf('hour').fromNow();