{"id":17472738,"url":"https://github.com/shinnn/exif-date-regex","last_synced_at":"2025-08-01T19:31:46.958Z","repository":{"id":65997839,"uuid":"138947185","full_name":"shinnn/exif-date-regex","owner":"shinnn","description":"A regular expression to validate and parse Exif date format","archived":false,"fork":false,"pushed_at":"2019-05-29T00:11:58.000Z","size":38,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-09T14:14:41.421Z","etag":null,"topics":["date","ecmascript","exif","javascript","lookbehind-assertion","named-capture","regular-expression","validation"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit-0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shinnn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-28T00:35:15.000Z","updated_at":"2024-07-01T19:26:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"c12bf9dc-a9f6-46bf-8910-146c183e6be3","html_url":"https://github.com/shinnn/exif-date-regex","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"1641a102f216a7d863a528c3da393c9fdd77f017"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/shinnn/exif-date-regex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fexif-date-regex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fexif-date-regex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fexif-date-regex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fexif-date-regex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinnn","download_url":"https://codeload.github.com/shinnn/exif-date-regex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fexif-date-regex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268285622,"owners_count":24225764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["date","ecmascript","exif","javascript","lookbehind-assertion","named-capture","regular-expression","validation"],"created_at":"2024-10-18T17:35:09.184Z","updated_at":"2025-08-01T19:31:46.924Z","avatar_url":"https://github.com/shinnn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# exif-date-regex\n\n[![npm version](https://img.shields.io/npm/v/exif-date-regex.svg)](https://www.npmjs.com/package/exif-date-regex)\n[![Github Actions](https://action-badges.now.sh/shinnn/exif-date-regex)](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/results/shinnn/exif-date-regex)\n\nA [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions) to validate and parse Exif date format\n\n```javascript\nimport exifDateRegex from 'exif-date-regex';\n\nexifDateRegex.exec('2018:06:27 14:05:28').groups; /*=\u003e {\n  year: '2018',\n  month: '06',\n  date: '27',\n  hours: '14',\n  minutes: '05',\n  seconds: '28'\n} */\n```\n\nAccording 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:\n\n\u003e \"YYYY:MM:DD HH:MM:SS\" with time shown in 24-hour\nformat, and the date and time separated by one blank character\n\n## Installation\n\n[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).\n\n```\nnpm install exif-date-regex\n```\n\n## API\n\n```javascript\nimport exifDateRegex from 'exif-date-regex';\n```\n\n### exifDateRegex\n\nType: [`RegExp`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp)\n\nThe regular expression has 6 capture groups `year`, `month`, `date`, `hours`, `minutes` and `seconds`.\n\n```javascript\n'2016:07:29 00:00:00'.replace(exifDateRegex, '$\u003cyear\u003e/$\u003cmonth\u003e/$\u003cdate\u003e'); //=\u003e '2016/07/29'\n```\n\nLeap years are taken into consideration.\n\n```javascript\nexifDateRegex.test('2016:02:29 12:30:00'); //=\u003e true\nexifDateRegex.test('2017:02:29 12:30:00'); //=\u003e false\n```\n\n## License\n\n[MIT No Attribution](./LICENSE) © 2019 Shinnosuke Watanabe\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Fexif-date-regex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinnn%2Fexif-date-regex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Fexif-date-regex/lists"}