RepositoryTypeScriptCNTrung Quốc
hustcc

hustcc/timeago.js

:clock8: :hourglass: timeago.js is a tiny(2.0 kb) library used to format date with `*** time ago` statement.

5.4ksao
406fork
7issue
3lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: date-format

#1 Repository của tuần

1
TINIX TRENDING·Chủ đề: timeago

#1 Repository của tuần

2
TINIX TRENDING·Chủ đề: datetime

#2 Repository của tuần

⏰ timeago.js — Thời gian sống động chỉ bằng 2KB

timeago.js là thư viện nano (<2KB) biến ngày giờ thành câu "X thời gian trước" hoặc "X thời gian nữa".

timeago.js là thư viện TypeScript nhỏ gọn dùng để định dạng thời gian theo dạng tương đối như 'vừa mới', '3 giờ trước', '2 tuần trước'. Hỗ trợ cả thời gian lùi lại (ago) và tương lai (in), đồng thời cho phép đăng ký ngôn ngữ tùy chỉnh. Phù hợp cho web và Node.js.

✨ Điểm nổi bật

  • Chỉ 2KB: Thư viện rất nhỏ gọn, tối ưu cho mọi dự án web.
  • Hỗ trợ i18n: Có sẵn ngôn ngữ en_US và zh_CN, dễ dàng mở rộng bằng API register.
  • Thời gian thực: Tự động cập nhật thời gian trên DOM thông qua render và cancel.
  • Đa nền tảng: Chạy trên cả Node.js và trình duyệt.
  • API đơn giản: Chỉ với 4 hàm: format, render, cancel, register.
  • Được kiểm thử: Độ tin cậy cao nhờ test suite đầy đủ.

💡 Vì sao đáng chú ý

timeago.js khác biệt từ các thư viện khác ở sự đơn giản và kích thước nhỏ đến mức không cần phụ thuộc nặng như jQuery. API trực quan giúp nhanh chóng tích hợp vào bất kỳ dự án nào, đặc biệt là các ứng dụng web yêu thích sự tốc độ và trải nghiệm người dùng mượt mà với thời gian cập nhật thời gian thực.


#timeago #datetime #JavaScript #i18n #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryJavaScript
aralroca/next-translate

Next.js plugin + i18n API for Next.js 🌍 - Load page translations and use them in an easy way!

2.7k
Oct 17, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryTypeScript
freeCodeCamp/freeCodeCamp

freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

459.9k
Dec 2, 2026
RepositoryTypeScript
nilbuild/developer-roadmap

Interactive roadmaps, guides and other educational content to help developers grow in their careers.

373.1k
Dec 1, 2026
RepositoryTypeScript
firecrawl/firecrawl

Firecrawl is the knowledge infrastructure to make your agents smarter. It connects your agents to the web, and to Alexandria, our library of everything else.

215.1k
Dec 2, 2026
RepositoryTypeScript
vuejs/vue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

212.6k
Oct 10, 2024
RepositoryPython
donnemartin/system-design-primer

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

379.9k
Sep 15, 2026
RepositoryPython
practical-tutorials/project-based-learning

Curated list of project-based tutorials

290.9k
Nov 30, 2026
RepositoryJavaScript
react/react

The library for web and native user interfaces.

253.0k
Nov 30, 2026