JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 543
  • Score
    100M100P100Q115996F
  • License Apache-2.0

Parse an EXIF date string into a `Date` object

Package Exports

  • 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 (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

Exif Date

NPM version NPM downloads Build status Test coverage

Parse an EXIF date string into a Date object.

Installation

npm install exif-date --save

Usage

import { parse, format } from 'exif-date'

parse('2016:07:11 21:33:20') //=> Date('2016-07-11T21:33:20.000Z')
format(new Date('2016-07-11T21:33:20.000Z')) //=> '2016:07:11 21:33:20'

P.S. Also parses sub-second precision and timezone offsets. Invalid attempts at parsing will return an invalid date. Invalid format attempts will return an empty string.

License

Apache 2.0