Skip to content

A parser for date values as they are used for start_date and similar tags.

License

Notifications You must be signed in to change notification settings

plepe/openstreetmap-date-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openstreetmap-date-parser

A parser for date values as they are used for start_date and similar tags.

Installations

npm install --save openstreetmap-date-parser

Related modules

API

It will return an array with the lower and upper boundaries for the year in which the event took place.

var osmDateParser = require('openstreetmap-date-parser')

console.log(osmDateParser('1984-10-20'))
// [ 1984, 1984 ]

console.log(osmDateParser('1914..1918'))
// [ 1914, 1918 ]

console.log(osmDateParser('early 1920s'))
// [ 1920, 1923 ]

console.log(osmDateParser('before 1855'))
// [ null, 1854 ]

About

A parser for date values as they are used for start_date and similar tags.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •