question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

timeline-vis dates default to 20th century

See original GitHub issue

Thanks for this cool plugin. I’m looking forward to using it extensively!

I created three timeline events ranging from A.D. 46 to A.D. 57 for testing purposes, and they’re displaying perfectly in the standard vertical timeline view. When I try a timeline-vis view, however, it defaults to showing dates in the 1900s (from 1960–1960 instead of 40–60) where there’s no data to display.

Screen Shot 2021-04-26 at 7 51 40 AM

Here’s my timeline data:

<span
	class='ob-timelines'
	data-date='46-00-00-00'
	data-title='Pauls first missionary journey'
	data-class='orange'
	data-type='range'
	date-end='48-00-00-00'>
</span>

<span
	class="ob-timelines"
	data-date="49-00-00-00"
	data-title="Paul's second missionary journey"
	data-class="orange"
	data-type="range"
	date-end="52-00-00-00">
</span>

<span
	class="ob-timelines"
	data-date="53-00-00-00"
	data-title="Paul's third missionary journey"
	data-class="orange"
	data-type="range"
	date-end="57-00-00-00">
</span>

And here’s the timeline-vis section. It’s not clear what elements are required, but I haven’t found any combination including minDate and maxDate that makes any difference.

startDate=40
endDate=60

Any suggestions?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Darakahcommented, Apr 27, 2021

Yes, that can be solved by simply not casting the date to an integer here https://github.com/Darakah/obsidian-timelines/blob/8d4172242a455d079586de664f629d64df21992e/src/utils.ts#L44 As it is removing the leading zeroes and for some reason javascript defaults to the 19s. Will fix it in the next release.

0reactions
OogieMcommented, Aug 18, 2021

Maybe related, I’m trying to make a timeline that ignores years. It’s to document when I need to plant seeds in the garden or start seeds and is based on my local area frost date. I’ve tried using a 0000 year and then the month and day but all the items stack up and no span. If I put in a year it all works. But I effectively want this to be aperpetual calendar not tied to a year.

Screen Shot 2021-08-18 at 5 50 22 AM

Code in the plant notes.

tags: timeline, test
---
<span 
      class='ob-timelines' 
      data-date='0000-07-02-00' 
      data-title='Plant carrots' 
     data-class='yellow'
      data-type='range' 
      data-end="0000-08-31-00"> 
</span>
tags: timeline, test
---
<span 
      class='ob-timelines' 
      data-date='0000-08-01-00' 
      data-title='Plant lettuce' 
      data-type='range' 
      data-end="0000-08-31-00"> 
</span>

side question, I’m not getting any different colors on the items but that is secondary to getting the data to display properly first.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Timeline Doesn't Work With Dates Before Common Era #307
When I attempt to display a Timeline data set containing dates before the Common Era ... Years 0-99AD default to the 20th century...
Read more >
Dates of Current and Past Vaccine Information Statements
VIS Current Edition Dates Previous Edition Dates Adenovirus 1/8/20 6/11/14 7/14/11 Anthrax 1/8/20 3/21/18 3/10/10 4/24/03 11/6/00 Cholera 10/30/19 7/6/17
Read more >
timeline - vis.js - A dynamic, browser based visualization library.
Name Type Default align String 'center' autoResize boolean true clickToUse boolean false
Read more >
vis-timeline - UNPKG
The CDN for vis-timeline. ... util';\n\n/** Prototype for visual components */\nexport default class Component {\n /**\n * @param ... n * Default is...
Read more >
How I can show Timeline year wise in Vis.js timeline?
You can use options as {stack:false} for making as same.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found