Our great sponsors
-
timeago.js
:clock8: :hourglass: timeago.js is a tiny(2.0 kb) library used to format date with `*** time ago` statement.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
timeago.js
:clock8: :hourglass: timeago.js is a tiny(2.0 kb) library used to format date with `*** time ago` statement. (by mrdotb)
Install tailwindcss - commit
We want to display when the game was played. ex: (1h ago, 1m ago ...) I found the nice timeago.js library.
/** * @license MIT * timeago.js 4.0.2 * https://github.com/mrdotb/timeago.js * Copyright (c) 2016 Hust.cc */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).timeago={})}(this,function(e){"use strict";function t(e,t){n[e]=t}function r(e){return n[e]||n.en_US}var n={},a=[60,60,24,7,365/7/12,12];function o(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function s(e,t){for(var n=e<0?1:0,r=e=Math.abs(e),o=0;e>=a[o]&&o=a[n]&&n
paginate the query with scrivener_ecto
Related posts
- Probuild Ex Part Four
- Avoid Trips To The Database With Nebulex - Phoenix Series
- The Lazy Programmer's Intro to LiveView: Chapter 3
- ecto_sqlite3_extras: Helpful queries and Phoenix Live Dashboard integration for SQLite. Must-have for SQLite-powered Elixir projects.
- Excellent_migrations: Detect potentially unsafe operations in Ecto DB migrations