Web Component: Tangular-Time


  • Info
  • HTML
  • JS
  • CSS
  • Meta

Tangular-Time

A simple Tangular template engine helper for rendering humanable date and time.

  • jComponent v19|v20

Outputs:

  • now
  • 5 minutes ago
  • 1 month ago
  • 2 years ago

Usage:

<h1>{{ name }}</h1>
<div>{{ created | time }}</div>

or

console.log(Thelpers.time(new Date()));

Improvements

New: Tangular helper time2 performs updating of time every minute automatically.