# ng-timeago

> Angular 9 Date, DateTime, and timeago

Latest version **0.0.9** (published 2020-06-07) · 0 weekly downloads

## Install

```sh
npm install ng-timeago
pnpm add ng-timeago
yarn add ng-timeago
bun add ng-timeago
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2020-06-07 |
| First published | 2019-08-08 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 49.6 KB |
| Known vulnerabilities | 0 (+21 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | JoyingSoft |
| Maintainers | junjunguo |

## Links

- npm: https://www.npmjs.com/package/ng-timeago
- Repository: https://github.com/joyingsoft/ng-timeago
- Homepage: https://github.com/joyingsoft/ng-timeago#readme
- Issues: https://github.com/joyingsoft/ng-timeago/issues
- npm.io page: https://npm.io/package/ng-timeago

## Dependencies (11)

- [rxjs](https://npm.io/package/rxjs.md) ~6.5.4
- [tslib](https://npm.io/package/tslib.md) ^1.13.0
- [zone.js](https://npm.io/package/zone.js.md) ~0.10.2
- [@angular/core](https://npm.io/package/@angular/core.md) ~9.1.9
- [@angular/forms](https://npm.io/package/@angular/forms.md) ~9.1.9
- [@angular/common](https://npm.io/package/@angular/common.md) ~9.1.9
- [@angular/router](https://npm.io/package/@angular/router.md) ~9.1.9
- [@angular/compiler](https://npm.io/package/@angular/compiler.md) ~9.1.9
- [@angular/animations](https://npm.io/package/@angular/animations.md) ~9.1.9
- [@angular/platform-browser](https://npm.io/package/@angular/platform-browser.md) ~9.1.9
- [@angular/platform-browser-dynamic](https://npm.io/package/@angular/platform-browser-dynamic.md) ~9.1.9

## Recent versions

- 0.0.9 (latest) — 2020-06-07
- 0.0.5 — 2019-08-08
- 0.0.4 — 2019-08-08
- 0.0.3 — 2019-08-08
- 0.0.2 — 2019-08-08

## README

# NgTimeago

Angular 9 Date, DateTime, and timeago

Currently only support Chinese language.

[![npm version](https://badge.fury.io/js/ng-timeago.svg)](https://badge.fury.io/js/ng-timeago)
[![licence](https://img.shields.io/badge/license-MIT-green)](./LICENSE)
[![Build Status](https://travis-ci.com/JoyingSoft/ng-timeago.svg?branch=master)](https://travis-ci.com/JoyingSoft/ng-timeago)

## Usage

### [demo](https://joyingsoft.github.io/ng-timeago/)

### Install

`npm i ng-timeago`

### Import

```angular
import { NgTimeagoModule } from 'ng-timeago';
@NgModule({
      imports: [..., NgTimeagoModule]
      ...})
```

### use

```angular
      .color-b {color:green;}
      ...
      <ng-timeago [date]="dt"
                  [styles]="'color-b'"></ng-timeago>
      <ng-timeago [date]="dt"
                  [show]="'date'"></ng-timeago>
      <ng-timeago [date]="dt"
                  [show]="'dateTime'"></ng-timeago>
      <ng-timeago [date]="dt"
                  [show]="'timeago'"></ng-timeago>
```

This project was generated with [Angular CLI](https://github.com/angular/angular-cli)

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

## Create Angular library with Angular CLI

create an empty workspace `ng new ng-timeago --create-application=false`

> --createApplication=true|false
> When true (the default), creates a new initial app project in the src folder of the new workspace.
> When false, creates an empty workspace with no initial app.
> You can then use the generate application command so that all apps are created in the projects folder.
> Default: true [doc](https://angular.io/cli/new)

Add library project `ng generate library ng-timeago -p=ng`

Add demo `ng generate application ng-timeago-demo`

Build library `ng build ng-timeago`

Run demo: `ng serve ng-timeago-demo`

Build Demo: `ng build ng-timeago-demo --prod --base-href "/ng-timeago/"`

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