Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jaid/epoch-seconds

Returns the amount of seconds passed since Unix epoch (1970).
https://github.com/jaid/epoch-seconds

1970 date date-now epoch gmt linux millis milliseconds now posix posix-epoch second seconds time timestamp unix unix-epoch utc

Last synced: 8 days ago
JSON representation

Returns the amount of seconds passed since Unix epoch (1970).

Awesome Lists containing this project

README

        

# epoch-seconds

License Sponsor epoch-seconds
Build status Commits since v3.0.2 Last commit Issues
Latest version on npm Dependents Downloads

**Returns the amount of seconds passed since Unix epoch (1970).**

## Installation

epoch-seconds on npm

```bash
npm install --save epoch-seconds@^3.0.2
```

epoch-seconds on Yarn

```bash
yarn add epoch-seconds@^3.0.2
```

## Example

```javascript
import epochSeconds from "epoch-seconds"

const result = epochSeconds()
```

Variable `result` will be something like:

```javascript
1549410770
```

## Development

Development hints for maintaining and improving epoch-seconds

Setting up:
```bash
git clone [email protected]:jaid/epoch-seconds.git
cd epoch-seconds
npm install
```
Testing:
```bash
npm run test:dev
```
Testing in production environment:
```bash
npm run test
```

## License
[MIT License](https://raw.githubusercontent.com/jaid/epoch-seconds/master/license.txt)
Copyright © 2021, Jaid \ (https://github.com/jaid)