JSPM

current-exif-date

0.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 27
  • Score
    100M100P100Q63832F
  • License ISC

Get the current date as an Exif date format

Package Exports

  • current-exif-date

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (current-exif-date) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

current-exif-date

npm version Build Status Coverage Status

Get the current date as an Exif date format

const currentExifDate = require('current-exif-date');

currentExifDate(); //=> '2018:06:15 10:13:05'

According to the Exif specification (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 npm.

npm install current-exif-date

API

const currentExifDate = require('current-exif-date');

currentExifDate()

Return: string

Note that the resultant date indicates the local time.

// In Japan

new 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 © 2018 Shinnosuke Watanabe