Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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).
- Host: GitHub
- URL: https://github.com/jaid/epoch-seconds
- Owner: Jaid
- License: mit
- Created: 2019-02-05T23:48:41.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-04-05T04:55:40.000Z (9 months ago)
- Last Synced: 2024-12-07T19:40:01.275Z (26 days ago)
- Topics: 1970, date, date-now, epoch, gmt, linux, millis, milliseconds, now, posix, posix-epoch, second, seconds, time, timestamp, unix, unix-epoch, utc
- Language: TypeScript
- Homepage: https://github.com/jaid/epoch-seconds
- Size: 8.95 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: readme.md
- Funding: .github/funding.yml
- License: license.txt
Awesome Lists containing this project
README
# epoch-seconds
**Returns the amount of seconds passed since Unix epoch (1970).**
## Installation
```bash
npm install --save epoch-seconds@^3.0.2
``````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)