1.0.5 • Published 3 years ago

ng2-timeago-fr-pipe v1.0.5

Weekly downloads
35
License
MIT
Repository
github
Last release
3 years ago

Ng2-timeago-fr-Pipe

A very simple Angular pipe for converting dates into a french time ago

Time RangePipe output
0 - 30 secondsà l'instant
30 - 59 secondsil y a X seconds
60 - 119 secondsil y a 1 minute
2 - 59 minutesil y a X minutes
60 minutes - 119 minutesil y a 1 heure
2 - 23 heuresil y a X heures
24 heurs - 47 heuresil y a 1 jour
2 jours - 6 joursil y a X jours
7 jours - 13 joursil y a 1 semaine
2 semaines - 3 semainesil y a X semaines
4 semaines - 7 semainesil y a 1 mois
2 mois - 11 moisil y a X mois
12 mois - 23 moisil y a 1 année
+ 2 ansil y a X années

Installation

you can import this package to your angular project as the following :

npm install ng2-timeago-fr-pipe --save

Usage

You can use this pipe in your angular projet, as the following :

1- Import the pipe Ng2TimeagoFrPipe in the module where you want to use it :

import { Ng2TimeagoFrPipe } from 'ng2-timeago-fr-pipe';

2- Add "Ng2TimeagoFrPipe" to your module declarations

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

3- finally, in your component template you can simply do :

<p>{{myBirthDate | ng2TimeagoFr}}</p>
1.0.5

3 years ago

1.0.4

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago