wn-formatter
v0.6.2
Published
Simple way to format your date with Pipe.
Downloads
5
Readme
WnFormatter (test readme.md)
Simple way to format your date with Pipe.
Installation
npm i date-formatter-ts
Sample Usage
- Register the
DateFormatterModule
in your app module.
import { DateFormatterModule } from 'wn-formatter/dist/date-formatter'
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { DateFormatterModule } from 'wn-formatter/dist/date-formatter'
@NgModule({
declarations: [
AppComponent,
],
imports: [
BrowserModule,
FormsModule,
AppRoutingModule,
DateFormatterModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
- Register the Pipe
dateformat
in your app module.
Accepted Date formats
Weekday: WWW (Ex: Sun,...,Sat), WWWW (Ex: Sunday,...,Monday)
Day: D (Ex: 1,2,..,11,12), DD (Ex: 01,02,...,11,12)
Month: M (Ex: 1,2,..,11,12), MM (Ex: 01,02,...,11,12), MMM (Ex: Jan,..,Dec), MMMM (Ex: January,..,December)
Year: YY (Ex: 90,...,22), YYYY (Ex: 1990,..,2022)