@vuecs/timeago
@vuecs/timeago
<VCTimeago> — live relative timestamps for Vue 3 ("3 minutes ago", "in 2 days"), part of vuecs. Locale-aware through vuecs's central locale config, auto-updating as time passes.
✨ What's inside
- 🕒 Flexible input —
:datetimeacceptsDate, epoch number, or ISO string. - 🔄 Auto-update — re-renders as the relative time changes; disable with
:auto-update="false". - 🌍 Locale-aware — reads the app-wide locale via
useLocale()from@vuecs/core(set it throughconfig: { locale },@vuecs/locale, or your i18n library); per-instance:localeprop wins. Registerdate-fnslocales viaprovideLocales. - 🧪 Custom converter — swap the formatting logic entirely via the
:converter/:converter-optionsprops.
📦 Installation
npm install @vuecs/timeago
⚡ Usage
<VCTimeago :datetime="post.createdAt" />
<VCTimeago :datetime="Date.now() - 60_000" locale="de-DE" />
📚 Documentation
Full reference + locale setup: vuecs.dev/components/timeago
License
Made with 💚
Published under Apache 2.0 License.
Related Packages
Version History
| Version | Released | License |
|---|---|---|
| 2.2.1 | Apache-2.0 | |
| 2.2.0 | Apache-2.0 | |
| 2.1.4 | Apache-2.0 | |
| 2.1.3 | Apache-2.0 | |
| 2.1.2 | Apache-2.0 | |
| 2.1.1 | Apache-2.0 | |
| 2.1.0 | Apache-2.0 | |
| 2.0.3 | Apache-2.0 | |
| 2.0.2 | Apache-2.0 | |
| 2.0.1 | Apache-2.0 | |
| 2.0.0 | Apache-2.0 | |
| 1.1.2 | ||
| 1.1.1 | ||
| 1.1.0 | ||
| 1.0.4 | ||
| 1.0.3 | ||
| 1.0.2 | ||
| 1.0.1 | ||
| 1.0.0 |