awesome-repositories.com
Blog
awesome-repositories.com

Entdecke die besten Open-Source-Repositories mit KI-gestützter Suche.

EntdeckenKuratierte SuchenOpen-Source-AlternativenSelf-hosted SoftwareBlogSitemap
ProjektÜber unsRanking-MethodikPresseMCP-Server
RechtlichesDatenschutzAGB
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
github avatar

github/relative-time-element

0
View on GitHub↗
4,005 Stars·188 Forks·JavaScript·MIT·2 Aufrufegithub.github.io/relative-time-element/examples↗

Relative Time Element

Dieses Projekt bietet ein Web-Component-Time-Element, das das Standard-HTML-Tag <time> erweitert, um menschenlesbare relative Zeitstempel und Countdowns anzuzeigen. Es fungiert als Formatierer für relative Zeitangaben und Zeitdauer-Rechner, der Zeitstempel in lokalisierte Strings umwandelt, die sich automatisch im Browser aktualisieren.

Das Tool ermöglicht dynamische Zeitstempel-Anzeigen, die basierend auf konfigurierbaren Schwellenwerten von relativen Phrasen zu absoluten Daten wechseln. Es umfasst Funktionen zur Einschränkung der Zeitform, wodurch Zeitstempel ausschließlich als vergangene oder zukünftige Daten angezeigt werden können, und unterstützt die präzise Formatierung von Zeitspannen über Jahre, Monate, Tage, Stunden, Minuten und Sekunden hinweg.

Die Implementierung nutzt die native Browser-Internationalization-API für das Rendering von Daten und die Lokalisierung über spezifische IANA-Zeitzonen. Der Status wird über DOM-Attribute verwaltet und ein Intervall-Polling stellt sicher, dass die Zeitanzeigen aktuell bleiben, ohne dass ein Seiten-Refresh erforderlich ist.

Features

  • Dynamic Relative Time Updaters - Provides a web component that automatically refreshes relative time labels like two hours ago.
  • Relative Time Formatting - Provides a web component that converts timestamps into localized relative strings that update automatically in the browser.
  • Duration Calculations - Provides utilities to calculate the elapsed or remaining time between timestamps for countdowns.
  • Human-Readable Duration Breakdown - Breaks down elapsed or remaining time into exact years, months, days, hours, minutes, and seconds.
  • Semantic Time Elements - Extends the standard HTML time tag to create a specialized element for human-readable relative timestamps and countdowns.
  • Countdown Timers - Calculates and displays the remaining time until a future event in detailed calendar units.
  • Internationalization API Integrations - Leverages the native browser Internationalization API for locale-aware date and relative time formatting.
  • Custom Element Wrappers - Provides a custom element wrapper that adds reactive behavior to the standard HTML time tag.
  • Web Components - Implements a reusable, modular custom HTML element based on the Web Components standard for time displays.
  • Format Transition Thresholds - Switches a date display from a relative phrase to a full absolute date once a specific time threshold is met.
  • Relative-to-Absolute Format Toggling - Sets a time threshold that switches a timestamp from a relative phrase to a full absolute date.
  • Date Localizations - Displays timestamps as localized date and time strings utilizing specific IANA time zones.
  • Temporal Threshold Rendering - Switches between relative phrasing and absolute date strings based on a configurable time difference limit.
  • Attribute-Driven State Synchronization - Implements state synchronization between DOM attributes and internal time calculations to enable reactive updates.
  • Date and Time Formatting - Adjusts date and time formatting based on browser locale settings and IANA time zones.
  • Asynchronous Polling Timers - Uses asynchronous polling timers to periodically refresh relative time displays without page reloads.

Star-Verlauf

Star-Verlauf für github/relative-time-elementStar-Verlauf für github/relative-time-element

KI-Suche

Entdecke weitere awesome Repositories

Beschreibe in einfachen Worten, was du brauchst — die KI bewertet tausende kuratierte Open-Source-Projekte nach Relevanz.

Start searching with AI

Open-Source-Alternativen zu Relative Time Element

Ähnliche Open-Source-Projekte, sortiert nach der Anzahl der gemeinsamen Funktionen mit Relative Time Element.
  • hustcc/timeago.jsAvatar von hustcc

    hustcc/timeago.js

    5,376Auf GitHub ansehen↗

    timeago.js is a JavaScript library that converts timestamps into human-readable relative time strings. It functions as an internationalized date library that transforms static date and time data into descriptive statements of elapsed time. The project provides a dynamic time updater that automatically refreshes relative time labels on a webpage at regular intervals. It supports multilingual date localization, allowing time-elapsed statements to be translated into various languages using built-in or custom locale settings.

    TypeScript
    Auf GitHub ansehen↗5,376
  • sdispater/pendulumAvatar von sdispater

    sdispater/pendulum

    6,668Auf GitHub ansehen↗

    Pendulum is a Python date and time library that provides a simplified interface for date arithmetic, ISO parsing, localization, and timezone management. It serves as a replacement for the standard library datetime module, extending existing classes to maintain compatibility while offering a more intuitive management interface. The library distinguishes itself through a natural language date formatter that translates time differences into localized strings and a dedicated ISO 8601 date parser. It also includes tools for time-dependent logic testing, allowing the system clock to be mocked or fi

    Python
    Auf GitHub ansehen↗6,668
  • dromara/carbonAvatar von dromara

    dromara/carbon

    5,221Auf GitHub ansehen↗

    Carbon is a Go library for semantic date and time calculations, formatting, and parsing. It provides a semantic interface to simplify temporal data handling and improve the readability of date and time manipulations. The library is distinguished by its support for multi-calendar date conversion, allowing transformations between Gregorian, Chinese Lunar, Persian, and Hebrew calendar systems. It also includes a localized temporal framework that uses ISO 639-1 codes to format dates and relative time differences across multiple language locales. Additional capabilities cover global time zone man

    Go
    Auf GitHub ansehen↗5,221
  • rmm5t/jquery-timeagoAvatar von rmm5t

    rmm5t/jquery-timeago

    3,800Auf GitHub ansehen↗

    This library is a client-side tool designed to transform static date strings into automatically updating, human-readable relative time labels within web interfaces. It functions as a plugin that scans the document for specific elements and converts their content into dynamic expressions, such as minutes or hours ago, to provide context for recent activity. The system distinguishes itself by decoupling display logic from JavaScript through attribute-driven configuration, allowing settings and date values to be managed directly within HTML. It maintains accuracy by employing interval-based poll

    JavaScript
    Auf GitHub ansehen↗3,800
Alle 30 Alternativen zu Relative Time Element anzeigen→

Häufig gestellte Fragen

Was macht github/relative-time-element?

Dieses Projekt bietet ein Web-Component-Time-Element, das das Standard-HTML-Tag <time> erweitert, um menschenlesbare relative Zeitstempel und Countdowns anzuzeigen. Es fungiert als Formatierer für relative Zeitangaben und Zeitdauer-Rechner, der Zeitstempel in lokalisierte Strings umwandelt, die sich automatisch im Browser aktualisieren.

Was sind die Hauptfunktionen von github/relative-time-element?

Die Hauptfunktionen von github/relative-time-element sind: Dynamic Relative Time Updaters, Relative Time Formatting, Duration Calculations, Human-Readable Duration Breakdown, Semantic Time Elements, Countdown Timers, Internationalization API Integrations, Custom Element Wrappers.

Welche Open-Source-Alternativen gibt es zu github/relative-time-element?

Open-Source-Alternativen zu github/relative-time-element sind unter anderem: hustcc/timeago.js — timeago.js is a JavaScript library that converts timestamps into human-readable relative time strings. It functions as… sdispater/pendulum — Pendulum is a Python date and time library that provides a simplified interface for date arithmetic, ISO parsing,… dromara/carbon — Carbon is a Go library for semantic date and time calculations, formatting, and parsing. It provides a semantic… rmm5t/jquery-timeago — This library is a client-side tool designed to transform static date strings into automatically updating,… muxinc/media-chrome — Media Chrome is a library of modular, accessible web components designed for building custom audio and video player… tc39/proposal-temporal — This project is a proposal for a new immutable date and time API in JavaScript. It serves as a precision time-tracking…