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

Gantt diagram states that is supports quarter in date format while it does not #5231

Open
lexa-diky opened this issue Jan 24, 2024 · 4 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@lexa-diky
Copy link

Description

In Gantt diagram documentation it states that Quarter dates are supported, while it is not. Day.js also has no mentioning of quarter support in the linked documentation https://day.js.org/docs/en/parse/string-format/

Steps to reproduce

  1. Use code in Code Sample section
  2. Q formatted numbers are formatted as month

Screenshots

Screenshot 2567-01-24 at 11 51 23

Code Sample

gantt
    title my-project
    dateFormat YYYY-Q
    axisFormat %Y %b
    section Section
        A task : 2023-4, 2024-1

Setup

  • Mermaid version: 10.7.0
  • Browser and Version: Safari

Suggested Solutions

  • remove line about Q support from documentation
  • implement Q support

Additional Context

No response

@lexa-diky lexa-diky added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Jan 24, 2024
@OldhamMade
Copy link

Upvote for option 2: to implement Q support.

@Amit0617
Copy link

You are using it wrong. Use it like 2020-Q1 for first quarter of 2020.
Read the docs http://mermaid.js.org/syntax/gantt.html#output-date-format-on-the-axis

@mmyrte
Copy link

mmyrte commented Jul 2, 2024

@Amit0617 You're referring to the output, whereas we want the input to be parsed as quarters.

@maehr
Copy link

maehr commented Oct 25, 2024

gantt
    dateFormat YY-Q
    axisFormat %Y %b

    section WP-1
    T1         :t1, 25-3, 25-4
    T2         :t2, after t1, 26-3

This worked for me

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

5 participants