# ngx-round-date

> [![npm version](https://badge.fury.io/js/ngx-round-date.svg)](http://badge.fury.io/js/ngx-round-date) [![npm downloads](https://img.shields.io/npm/dm/ngx-round-date.svg)](https://npmjs.org/ngx-round-date)

Latest version **0.0.9** (published 2022-10-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install ngx-round-date
pnpm add ngx-round-date
yarn add ngx-round-date
bun add ngx-round-date
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2022-10-14 |
| First published | 2022-10-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 19.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Daniele Olgiati |
| Maintainers | danyolgiax |

## Links

- npm: https://www.npmjs.com/package/ngx-round-date
- npm.io page: https://npm.io/package/ngx-round-date

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.3.0

## Recent versions

- 0.0.9 (latest) — 2022-10-14
- 0.0.8 — 2022-10-14
- 0.0.7 — 2022-10-14
- 0.0.6 — 2022-10-14
- 0.0.5 — 2022-10-14
- 0.0.4 — 2022-10-14
- 0.0.3 — 2022-10-14
- 0.0.2 — 2022-10-14
- 0.0.1 — 2022-10-14

## README

## ngx-round-date

[![npm version](https://badge.fury.io/js/ngx-round-date.svg)](http://badge.fury.io/js/ngx-round-date)
[![npm downloads](https://img.shields.io/npm/dm/ngx-round-date.svg)](https://npmjs.org/ngx-round-date)

**Simple round-date pipe**

- Compatible with [Angular](https://angular.io/) version 12.2.0

## Example
Code:

```typescript
this.testDate=new Date(2022,12,31,23,59,59);
```
    
Template:

```html
<span>{{testDate | roundDate}}</span> 
```

  
It displays:

```html
01/02/2023 00:00:00
```



## Usage

1. Install **ngx-round-date** through [npm](https://www.npmjs.com/package/ngx-round-date) package manager using the following command:

    ```bash
    npm i ngx-round-date --save
    ```

2. Add RoundDatePipeModule into your AppModule class. app.module.ts would look like this:

    ```typescript
    import {NgModule} from '@angular/core';
    import {BrowserModule} from '@angular/platform-browser';
    import {AppComponent} from './app.component';
    import { RoundDatePipeModule } from 'ngx-round-date';

    @NgModule({
      imports: [BrowserModule, RoundDatePipeModule],
      declarations: [AppComponent],
      bootstrap: [AppComponent],
    })
    export class AppModule {
    }
    ```
    
3. Add the pipe into html (default round 5 minutes)

    ```html
    <span>{{testDate | roundDate}}</span>
    ```  
    or
    ```html
    <span>{{testDate | roundDate:10}}</span>
    ```  

### License

The MIT License (see the [LICENSE](https://github.com/danyolgiax/ngx-round-date/blob/main/LICENCE) file for the full text)

---
_Source: https://npm.io/package/ngx-round-date · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
