srs-format-date
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

SRS-Format-Date

Simple way to format your date with Pipe.

Table of Contents

Installation

$ npm i srs-format-date

Usage

To use SrsFormatDatePipe in your Angular project, import the SrsFormatDateModule into your module and add it to your template.For example, to use the formatdate pipe:

In your app.module:

import { SrsFormatDateModule } from 'srs-format-date';

    @NgModule({
        // ...
        imports: [
            // ...
            SrsFormatDateModule,
            // ...
        ],
        // ...
    })
export class AppModule { }

In your component's template:

<p>{{ date | formatdate : arg1 : arg2 }}</p>

arg1 This is era, can be "AD" or "BE".

  • "AD" = Anno Domini
  • "BE" = Buddhist Era (+ 543 years)

arg2 Format of date output

Example

In your component's template:

<p>{{ date | formatdate : "AD" : "dd-MM-yyyy" }}</p>

Package Sidebar

Install

npm i srs-format-date

Weekly Downloads

0

Version

0.0.1

License

none

Unpacked Size

25 kB

Total Files

16

Last publish

Collaborators

  • winniezero