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

Dates in excludes are ignored in Gantt diagrams #3761

Open
gerukin opened this issue Nov 6, 2022 · 1 comment
Open

Dates in excludes are ignored in Gantt diagrams #3761

gerukin opened this issue Nov 6, 2022 · 1 comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@gerukin
Copy link

gerukin commented Nov 6, 2022

Description

In Gantt diagrams, while excluding Saturdays or Weekends works, specific dates (ex: 2022-11-10) are ignored. Both with no styling and with no impact on task end dates.

Steps to reproduce

  1. Add a Gantt diagram with an excluded date:
    ```mermaid
    gantt
      excludes 2022-11-08
    
      Task :2022-11-06, 4d
    ```
    gantt
      excludes 2022-11-08
    
      Task :2022-11-06, 4d
    
  2. Unexpectedly matches the same diagram without the excluded date:
    ```mermaid
    gantt
      Task :2022-11-06, 4d
    ```
    gantt
      Task :2022-11-06, 4d
    

Screenshots

No response

Code Sample

gantt
  excludes 2022-11-08

  Task :2022-11-06, 4d

Setup

Desktop

  • OS and Version: Mac
  • Browser and Version: Chrome, Safari

Additional Context

Live editor (with date):

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

gerukin commented Feb 7, 2023

Additional context...

It does work if the date format is explicitly given (even if using the default format):

gantt
	axisFormat %m-%d
	dateFormat YYYY-MM-DD
	excludes 2023-02-23, Weekends

	Span :active, span, 2023-02-22, 2d
	A :active, a, 2023-02-22, 1d
	B :after a, 2d
gantt
	axisFormat %m-%d
	dateFormat YYYY-MM-DD
	excludes 2023-02-23, Weekends

	Span :active, span, 2023-02-22, 2d
	A :active, a, 2023-02-22, 1d
	B :after a, 2d

Even there, there is still a failure case, when the start of the task is set to the excluded date, which is no longer skipped:

gantt
	axisFormat %m-%d
	dateFormat YYYY-MM-DD
	excludes 2023-02-23, Weekends

	Span :active, span, 2023-02-23, 2d

@jgreywolf jgreywolf added roadmap items to add to roadmap for auto workflow and removed roadmap items to add to roadmap for auto workflow labels Nov 16, 2023
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