almende / chap-links-library

a web based visualization library for displaying graphs, networks, and timelines
http://almende.github.com/chap-links-library
Apache License 2.0
599 stars 167 forks source link

Years 0-99AD default to the 20th century (1900+) #347

Open badzster opened 9 years ago

badzster commented 9 years ago

I am trying to create a timeline which includes the years 1-99AD. Unfortunately, if I use the following date: 14-08-19 (YY-MM-DD), it defaults to the year 1914. Changing the year 14AD to 100AD the problem goes away. Also, there is no year 0. Only 1BC and 1AD. How would I fix this? Thanks for you help - it is a great script.

josdejong commented 9 years ago

In modern browsers you can create a date like new Date('0001-03-18'). You could also provide a unix timestamp like -62129030400000.

See also this related discussion in the successor of chap-links-library: https://github.com/almende/vis/issues/307