MrHarrisonBarker / ng-time-from-pipe

A simple pipe to display the time passed from the input date in real time.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ng-time-from-pipe

npm npm GitHub issues NPM Build&Publish

A simple pipe to display the time passed from the input date. Also includes a <time-from> component with hover switching effect (switch between time from and raw date format).

Updates as time passes.

Install

npm install ng-time-from-pipe

Usage

You can import in the @NgModule.

import { TimeFromPipeModule } from "ng-time-from-pipe";

then add to imports array.

@NgModule( { 
  declarations: [ ... ],
  imports: [ ..., TimeFromPipeModule, ... ]
})

you can choose between the time from pipe and the time from component (time from component has hover effect).

<time-from [value]="date"></time-from>
Attribute Type
value Input date toe be formated
<span>{{ date | timeFrom  }}</span>
Attribute Type
value Any. Date to be formated
isOn Boolean. Turns on and off pipe

About

A simple pipe to display the time passed from the input date in real time.

License:MIT License


Languages

Language:TypeScript 84.6%Language:JavaScript 11.5%Language:HTML 3.5%Language:CSS 0.5%