dosubot[bot] commented on issue #31927: URL: https://github.com/apache/superset/issues/31927#issuecomment-2601023644
<!-- Greeting --> Hey @AdrianMastronardi! I'm here to help you with any bugs, questions, or contribution guidance you may need. Let's squash those bugs together! 🐞 <!-- Answer --> The issue you're experiencing with the "Week starting Monday" time grain in Superset 4.1.1 is due to the way the time grain expression is defined in the code. The expression for `TimeGrain.WEEK_STARTING_MONDAY` calculates the start of the week by finding the previous Monday and then subtracting 7 days, which effectively shifts the start of the week to Tuesday of the previous week. This results in a week that runs from Tuesday to Monday, rather than the expected Monday to Sunday <sup>[[1]](https://github.com/apache/superset/blob/master/superset/db_engine_specs/sqlite.py)</sup>. This behavior is inconsistent with the expected behavior, which should format the date range starting from Monday to the following Sunday <sup>[[2]](https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-core/test/time-format/TimeFormatterRegistrySingleton.test.ts)</sup>. There is a known issue related to this in the Superset GitHub repository, and it has been mentioned as a bug fix in the changelog <sup>[[3]](https://github.com/apache/superset/blob/master/superset-frontend/CHANGELOG.md)</sup>. To address this, you might need to adjust the time grain expression in your Superset configuration or wait for an update that resolves this issue. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/216f66aa-ed63-4ad6-b082-c3d5be141386?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/216f66aa-ed63-4ad6-b082-c3d5be141386?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/216f66aa-ed63-4ad6-b082-c3d5be141386?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/216f66aa-ed63-4ad6-b082-c3d5be141386?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/216f66aa-ed63-4ad6-b082-c3d5be141386?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/216f66aa-ed63-4ad6-b082-c3d5be141386?feedback_type=other)</sup> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
