Comments (4)
Just as an update, seems like we might be able to pull off formats like X hours ago
without any external dependencies using Intl.RelativeTimeFormat. Safari started supporting it late last year so it should be ok to use: https://caniuse.com/mdn-javascript_builtins_intl_relativetimeformat
Sample output in Devtools just as a quick demo:
from examples.
From a tech perspective, I'd personally prefer a date string "3rd of October, 2021" 'cause of the dependency thing you mentioned. @benhaynes ?
from examples.
That works — as simple as possible!
Can we do: October 3
when in this year, and October 3, 2020
when in a previous year? I assume that doesn't need a library. If that's too much overhead, let's just do October 3, 2020
format for all.
from examples.
Oh, nice!! Would love to have more control here!
from examples.
Related Issues (20)
- Add an example with Quasar Framework HOT 3
- Directus Examples: Integrations HOT 3
- CORS Issue with React Example and Directus Cloud HOT 2
- Install error on examples/nuxt3/nuxt3-directus-blog/ HOT 2
- useAsyncData example for static generation HOT 2
- Sveltekit example out of date. HOT 3
- SQLITE_ERROR: table directus_sessions has no column named origin HOT 1
- Astro example is broken HOT 1
- More than one instance … HOT 2
- NextJS Example doesn't work HOT 2
- Docker directus example and git workflow database HOT 2
- Cannot query field "directus" on type "Query". HOT 1
- Cors Error HOT 2
- Astro Example: You don't have permission to access this. HOT 3
- Vue example doesn't work - fails with CORS error HOT 2
- NextJS example needs updates HOT 1
- Vue example doesn't work - docker-compose file is invalid HOT 1
- New Sveltekit example
- Astro example isn't working HOT 1
- website-next13 - can't be build -
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from examples.