tzdata-coordinate-regex
A regular expression for time zone coordinates in zone.tab format
tzdataCoordinateRegex; //=> truetzdataCoordinateRegex; //=> true
Installation
npm install tzdata-coordinate-regex
API
;
tzdataCoordinateRegex
Type: RegExp
It matches time zone coordinates in tz database format:
Latitude and longitude of the zone's principal location in ISO 6709 sign-degrees-minutes-seconds format, either
+-DDMM+-DDDMM
or+-DDMMSS+-DDDMMSS
, first latitude (+
is north), then longitude (+
is east).
tzdataCoordinateRegex;/*=> [ '+4254-07436', '+', '42', '54', undefined, '-', '074', '36', undefined, index: 0, input: '+4254-07436', groups: { latitudeSeconds: undefined, longitudeSeconds: undefined }] */ tzdataCoordinateRegex;/*=> [ '-353916+1394441', '-', '35', '39', '16', '+', '139', '44', '41', index: 0, input: '-353916+1394441', groups: { latitudeSeconds: '16', longitudeSeconds: '41' }] */
License
ISC License © 2018 Shinnosuke Watanabe