Press "Enter" to skip to content

Angular Pretty Date for Facebook Like Time Stamps | ngx-prettydate

AngularJS Pretty Date is Facebook, Twitter-like date conversion in Angular using Angular Pipes.

angular unix timestamp to date pipe, convert timestamp to date javascript, javascript timestamp format, angular time duration pipe, javascript convert timestamp to date timezone

How to Visualize Time Series Data With ╬╝Plot Chart Library

How to make use of it:

Install & Usage:

# NPM
$ npm install ngx-pretty-date --save
import { NgxPrettyDateModule } from 'ngx-pretty-date';
@NgModule({
  declarations: [
    ...
  ],
  imports: [
    ...
    NgxPrettyDateModule
  ],
  bootstrap: [...]
})
export class AppModule { }
<span> {{dateObj | prettyDate}} </span>

Examples

InputOutput
Current timejust now
Till 60 seconds1 minute ago
2 to 59 minutesX minutes ago
60 minutes1 hour ago
2 to 23 hoursX hours ago
24 hoursYesterday
2 to 6 daysX days ago
7 days1 week ago
8 to 30 daysX weeks ago
30 days to 365 daysX months ago
more than 365 daysmore than a year ago
Date string 2019-12-24T06:18:445 weeks ago
Text StringInvalid Date

Convert Dates Into Human-readable Timestamps, Angular Pretty Date Plugin/Github, timestamp to day javascript, convert timestamp to utc javascript, convert unix timestamp to datetime


See Demo And Download

Official Website(keshavkhatri): Click Here

This superior jQuery/javascript plugin is developed by keshavkhatri. For extra Advanced Usages, please go to the official website.

Be First to Comment

    Leave a Reply

    Your email address will not be published.