# react-native-package-time

> Get the packaging time of the app.

Latest version **0.2.0** (published 2022-06-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-package-time
pnpm add react-native-package-time
yarn add react-native-package-time
bun add react-native-package-time
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2022-06-09 |
| First published | 2021-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 27.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Shengwu Cong |
| Maintainers | user219 |
| Keywords | react-native, react-native-component, ios, android, time, timestamp, package, build |

## Links

- npm: https://www.npmjs.com/package/react-native-package-time
- Repository: https://github.com/congshengwu/react-native-package-time
- Homepage: https://github.com/congshengwu/react-native-package-time#readme
- Issues: https://github.com/congshengwu/react-native-package-time/issues
- npm.io page: https://npm.io/package/react-native-package-time

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2022-06-09
- 0.1.0 — 2021-11-29
- 0.0.2 — 2021-11-29
- 0.0.1 — 2021-11-29

## README

# react-native-package-time

Get the packaging(build / compile) time for your app.

## Installation

`yarn add react-native-package-time`

or

`npm i react-native-package-time`

Don't forget to run `pod install` under your project `/ios` folder.

## Usage

```typescript
import PackageTime from 'react-native-package-time';

// or

import { getPackageTime } from 'react-native-package-time';

// Unix timestamp, in milliseconds.
getPackageTime().then((time): nubmer => {
  console.log(time); // 1638201352000
});

```

## API

| Method                |      Param      |     Return Type     |   iOS   | Android  | Description                                                                           |
|:----------------------|:---------------:|:-------------------:|:-------:|:--------:|:--------------------------------------------------------------------------------------|
| getPackageTime()      |        -        |  `Promise<number>`  |  true   |   true   | The packaging(build / compile) time of App                                            |
| getFirstInstallTime() |        -        |  `Promise<number>`  |  true   |   true   | The first install time of App (It will not change until uninstallation)               |
| getLastUpdateTime()   |        -        |  `Promise<number>`  |  true   |   true   | The update install time of App (On iOS, **Version** or **Build** changes is required) |

## How to run the example project

1. Clone the code from master branch.
2. Go into the root directory of this project, and run `yarn` or `npm install`.
3. Go into the `/example/ios` directory, and run `pod install`. (Optional, only for running example on iOS device)
4. Under the directory `/example`, run `yarn android` or `npm run android` for Android device, and `yarn ios` or `npm run ios` for iOS device.

## Todo

- [x] Get the first installation time of the app.
- [x] Get the update installation time of the app.

## License

MIT

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