![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
ngx-pretty-date
Advanced tools
Angular js pipe for facebook, twitter like date time format, supports angular 8
Facebook, twitter like date conversion in Angular using angular pipes. Supports angular 8.
Check out the demo
Input | Output |
---|---|
Current time | just now |
Till 60 seconds | 1 minute ago |
2 to 59 minutes | X minutes ago |
60 minutes | 1 hour ago |
2 to 23 hours | X hours ago |
24 hours | Yesterday |
2 to 6 days | X days ago |
7 days | 1 week ago |
8 to 30 days | X weeks ago |
30 days to 365 days | X months ago |
more than 365 days | more than a year ago |
Date string 2019-12-24T06:18:44 | 5 weeks ago |
Text String | Invalid Date |
npm install --save ngx-pretty-date
import { NgxPrettyDateModule } from 'ngx-pretty-date';
@NgModule({
declarations: [
...
],
imports: [
...
NgxPrettyDateModule
],
bootstrap: [...]
})
export class AppModule { }
<span> {{dateObj | prettyDate}} </span>
You can pass javascript date object or string like this '2019-12-24T06:18:44'
You can pass date format with the pipe example below
<span> {{dateObj | prettyDate:'dd/mm/yyyy'}} </span>
Valid formats are
cd projectRoot
npm install
ng serve
FAQs
Angular js pipe for facebook, twitter like date time format, supports angular 8
The npm package ngx-pretty-date receives a total of 22 weekly downloads. As such, ngx-pretty-date popularity was classified as not popular.
We found that ngx-pretty-date demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.