Returns the number of seconds, minutes, days, months or years for a Date object from the current system time
1 person uses it
Author: 6976199?v=3 thisissoon
Submitted by: 7836746?v=4 edoparearyee

Angular TimeSince

Build Status Coverage Status

A simple lightweight library for Angular (2/4+) which removes excess text and add timesince symbol to end of text before text overflows container.

This is a simple library for Angular, implemented in the Angular Package Format v4.0.


npm i @thisissoon/angular-timesince --save


` import { TimeSinceModule } from '@thisissoon/angular-timesince';

@NgModule({ imports: [ TimeSinceModule ] }) export class AppModule { } `



<p>{{ date | timeSince }} ago</p>


Use any Date object or Date parsable value

export class AppComponent { date = new Date("2010-08-24T16:16:09.540Z"); // or // date = "2010-08-24T16:16:09.540Z" }

comments powered by Disqus
This page was last updated about 1 year ago.