exif-date-regex
A regular expression to validate and parse Exif date format
; exifDateRegexgroups; /*=> { year: '2018', month: '06', date: '27', hours: '14', minutes: '05', seconds: '28'} */
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
npm install exif-date-regex
API
;
exifDateRegex
Type: RegExp
The regular expression has 6 capture groups year
, month
, date
, hours
, minutes
and seconds
.
'2016:07:29 00:00:00'; //=> '2016/07/29'
Leap years are taken into consideration.
exifDateRegex; //=> trueexifDateRegex; //=> false
License
MIT No Attribution © 2019 Shinnosuke Watanabe