Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shinnn/current-exif-date
Get the current date as an Exif date format
https://github.com/shinnn/current-exif-date
Last synced: 27 days ago
JSON representation
Get the current date as an Exif date format
- Host: GitHub
- URL: https://github.com/shinnn/current-exif-date
- Owner: shinnn
- License: isc
- Created: 2018-06-15T01:36:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-29T04:19:23.000Z (over 5 years ago)
- Last Synced: 2024-09-16T00:28:29.535Z (about 2 months ago)
- Language: JavaScript
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# current-exif-date
[![npm version](https://img.shields.io/npm/v/current-exif-date.svg)](https://www.npmjs.com/package/current-exif-date)
[![Build Status](https://travis-ci.com/shinnn/current-exif-date.svg?branch=master)](https://travis-ci.com/shinnn/current-exif-date)
[![Coverage Status](https://img.shields.io/coveralls/shinnn/current-exif-date.svg)](https://coveralls.io/github/shinnn/current-exif-date?branch=master)Get the current date as an Exif date format
```javascript
const currentExifDate = require('current-exif-date');currentExifDate(); //=> '2018:06:15 10:13:05'
```According to the [Exif specification (PDF)](http://www.cipa.jp/std/documents/e/DC-008-Translation-2016-E.pdf), the format of `DateTime`, `DateTimeOriginal` and `DateTimeDigitaized` is:
> "YYYY:MM:DD HH:MM:SS" with time shown in 24-hour
format, and the date and time separated by one blank character## Installation
[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).
```
npm install current-exif-date
```## API
```javascript
const currentExifDate = require('current-exif-date');
```### currentExifDate()
Return: `string`
Note that the resultant date indicates the *local* time.
```javascript
// In Japannew Date().toString(); //=> 'Fri Jun 15 2018 01:04:30 GMT+0900 (JST)'
new Date().toUTCString(); //=> 'Thu, 14 Jun 2018 16:04:30 GMT'currentExifDate(); //=> '2018:06:15 01:04:30', not '2018:06:14 01:04:30 16:04:30'
```## License
[ISC License](./LICENSE) © 2018 - 2019 Shinnosuke Watanabe