angular-dayjs
v0.0.4
Published
2KB immutable date time library alternative to Moment.js with the same modern API
Downloads
630
Maintainers
Readme
Angular Dayjs
AngularDayjs provider for Angular 11+
Demo
coming soon...
Installation
npm install --save angular-dayjs dayjs
or if you use yarn:
yarn add angular-dayjs dayjs
Usage
Import AngularDayjsModule into your app's modules:
import { AngularDayjsModule } from 'angular-dayjs';
@NgModule({
imports: [
AngularDayjsModule
]
})
Import NgxBootstrapConfirmService into your app's components:
import { Component } from '@angular/core';
import { AngularDayjsService } from 'angular-dayjs';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
constructor(public angularDayjsService: AngularDayjsService){}
}
#app.component.html Unix time stamp
TimeAgo - Date
<div>angularDayjsService.timeAgo('2020-12-25T23:48:42-05:00')</div>
<router-outlet></router-outlet>
License
The MIT License (MIT)