Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ancient dates in Gantt charts (or other timelines) #5695

Closed
piperoc opened this issue Aug 6, 2024 · 3 comments
Closed

Ancient dates in Gantt charts (or other timelines) #5695

piperoc opened this issue Aug 6, 2024 · 3 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@piperoc
Copy link

piperoc commented Aug 6, 2024

Description

I would like to create a Gantt of events that occurred in the ancient past, where the date would fall in the Before Common Era (BCE).
I tried various ways but could not find any information or a way to do this.

The markdown would look something like:

gantt
    title Roman Kings Timeline
    dateFormat  YYYY
    axisFormat %Y

    Romulus: rm, 753 BCE, 37y
    Numa Pompilius: np, 715 BCE, 42y
    Tullius Hostilius: th, 673 BCE, 32y

Of course, this does not work since I do not know whether there is a syntax for such use case.
Maybe it is not possible.

Steps to reproduce

  1. type the following in the Live editor:
gantt
    title Roman Kings Timeline
    dateFormat  YYYY
    axisFormat %Y

    Romulus: rm, 753 BCE, 37y
    Numa Pompilius: np, 715 BCE, 42y
    Tullius Hostilius: th, 673 BCE, 32y
  1. No diagram is displayed, but also no error is reported by the editor.

Screenshots

No response

Code Sample

No response

Setup

  • Mermaid version:
  • Browser and Version: [Chrome, Edge, Firefox]

Suggested Solutions

No response

Additional Context

No response

@piperoc piperoc added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Aug 6, 2024
@piperoc
Copy link
Author

piperoc commented Aug 6, 2024

I have the feeling that the limitation might be to the Unix Timestamp which only counts from 1/1/1970...

@piperoc
Copy link
Author

piperoc commented Aug 7, 2024

Someone answered me on StackOverflow so I used the JavaScript notation for "negative" dates. Here's what I got.

gantt
    title Roman Kings Timeline
    dateFormat  YYYY
    axisFormat %Y BCE

    Romulus: rm, -00753, 37y
    Numa Pompilius: np, -00715, 42y
    Tullius Hostilius: th, -00673, 32y

Which is not perfect but at least it's more accurate.

I don't know if there is an idea for the year out format, which is not a showstopper anyway.

@jgreywolf
Copy link
Contributor

Closing as duplicate of #4437

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

2 participants