vis.js-timeline

How to do a timeline with BC / BCE Years on Vis.js-timeline


I've been trying to do a timeline of dates with vis.js-timeline that are BC or before 0. Tried start: '-0050-01-1' and start: '-50-01-1' and they don't show.

Couldn't find documentation on this.


Solution

  • So reading the object of Expanded Years from ECMAScript 2022 Language Specification found that:

    In the simplified ECMAScript format, such an expanded year representation shall have 6 digits and is always prefixed with a + or - sign.

    Tried '-000460-04-20' and it shows as -460 (BC).