awesome-repositories.com
Blog
awesome-repositories.com

Descoperă cele mai bune repository-uri open source cu căutare AI.

ExploreazăCăutări recomandateAlternative open-sourceSoftware self-hostedBlogHartă site
ProiectDespreCum realizăm clasamentulPresăServer MCP
LegalConfidențialitateTermeni
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
github avatar

github/relative-time-element

0
View on GitHub↗
4,005 stele·188 fork-uri·JavaScript·MIT·2 vizualizărigithub.github.io/relative-time-element/examples↗

Relative Time Element

This project provides a web component time element that extends the standard HTML time tag to display human-readable relative timestamps and countdowns. It functions as a relative time formatter and time duration calculator, converting timestamps into localized strings that update automatically in the browser.

The tool enables dynamic timestamp displays that transition from relative phrases to absolute dates based on configurable time thresholds. It includes capabilities for date tense restriction, forcing timestamps to display exclusively as past or future dates, and supports precise duration formatting across years, months, days, hours, minutes, and seconds.

The implementation leverages the native browser Internationalization API for date rendering and localization across specific IANA time zones. It manages state through DOM attributes and utilizes interval polling to ensure time displays remain current without requiring a page refresh.

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.

Istoric stele

Graficul istoricului de stele pentru github/relative-time-elementGraficul istoricului de stele pentru github/relative-time-element

Căutare AI

Explorează mai multe repository-uri excelente

Descrie ce ai nevoie în limbaj simplu — AI-ul sortează mii de proiecte open source selectate în funcție de relevanță.

Start searching with AI

Întrebări frecvente

Ce face github/relative-time-element?

This project provides a web component time element that extends the standard HTML time tag to display human-readable relative timestamps and countdowns. It functions as a relative time formatter and time duration calculator, converting timestamps into localized strings that update automatically in the browser.

Care sunt principalele funcționalități ale github/relative-time-element?

Principalele funcționalități ale github/relative-time-element sunt: Dynamic Relative Time Updaters, Relative Time Formatting, Duration Calculations, Human-Readable Duration Breakdown, Semantic Time Elements, Countdown Timers, Internationalization API Integrations, Custom Element Wrappers.

Care sunt câteva alternative open-source pentru github/relative-time-element?

Alternativele open-source pentru github/relative-time-element includ: 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…

Alternative open-source pentru Relative Time Element

Proiecte open-source similare, clasificate după numărul de funcționalități comune cu Relative Time Element.
  • hustcc/timeago.jsAvatar hustcc

    hustcc/timeago.js

    5,376Vezi pe GitHub↗

    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
    Vezi pe GitHub↗5,376
  • sdispater/pendulumAvatar sdispater

    sdispater/pendulum

    6,668Vezi pe GitHub↗

    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
    Vezi pe GitHub↗6,668
  • dromara/carbonAvatar dromara

    dromara/carbon

    5,221Vezi pe GitHub↗

    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
    Vezi pe GitHub↗5,221
  • rmm5t/jquery-timeagoAvatar rmm5t

    rmm5t/jquery-timeago

    3,800Vezi pe GitHub↗

    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
    Vezi pe GitHub↗3,800
  • Vezi toate cele 30 alternative pentru Relative Time Element→