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

Make calendar calculateDurationMs project independent #7335

Closed
marciogurka opened this issue Aug 18, 2023 · 1 comment
Closed

Make calendar calculateDurationMs project independent #7335

marciogurka opened this issue Aug 18, 2023 · 1 comment
Assignees
Labels
feature request forum Issues from forum OEM OEM customer premium resolved Fixed but not yet released (available in the nightly builds)
Milestone

Comments

@marciogurka
Copy link

Forum post

"Hello!

Currently porting calendar functionality from an older version of Bryntum and have a small feature request. We are using the calendar independently of any project, as a way to use the duration calculation methods. In the current Bryntum version that is not possible because of the way it checks for 'adjustDurationToDST' in the calculateDurationMs method

            const adjustDurationToDST   = this.getProject().adjustDurationToDST

If that could be optionally chained, even better with a fallback set as a parameter during the calendar initialization, that would be extremely helpful."

@marciogurka marciogurka added feature request premium forum Issues from forum OEM OEM customer labels Aug 18, 2023
@gismya
Copy link

gismya commented Aug 21, 2023

To clarify, the easiest solution would be to simply change the quoted row to
const adjustDurationToDST = this.getProject()?.adjustDurationToDST ?? false; like you do in accumulateWorkingTime. That would definitely be enough. The suggestion to add a DST adjustment option to the calendar init was mostly a random thought I got at the same time and not something I have any known use for at the moment.

@canonic-epicure canonic-epicure self-assigned this Aug 21, 2023
@canonic-epicure canonic-epicure added in progress ready for review Issue is fixed, the pull request is being reviewed and removed in progress labels Aug 25, 2023
@isglass isglass added resolved Fixed but not yet released (available in the nightly builds) and removed ready for review Issue is fixed, the pull request is being reviewed labels Aug 31, 2023
@isglass isglass added this to the 5.5.3 milestone Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request forum Issues from forum OEM OEM customer premium resolved Fixed but not yet released (available in the nightly builds)
Projects
None yet
Development

No branches or pull requests

4 participants