Skip to content

Commit

Permalink
fix: dates inconsistencies in new task wizard and schedules
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-mng authored and timopollmeier committed Jun 25, 2024
1 parent c4542fd commit 97516f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/gmp/commands/wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class WizardCommand extends HttpCommand {
event_data_quick_task_fields,
);

event_data['event_data:start_day'] = start_date.day();
event_data['event_data:start_day'] = start_date.date();
event_data['event_data:start_month'] = start_date.month() + 1;
event_data['event_data:start_year'] = start_date.year();

Expand Down
4 changes: 2 additions & 2 deletions src/gmp/models/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import ical from 'ical.js';

import {v4 as uuid} from 'uuid';
Expand Down Expand Up @@ -305,7 +304,8 @@ class Event {
}

get duration() {
return createDuration({...this.event.duration});
const {weeks, ...durationWithoutWeeks} = this.event.duration;
return createDuration(durationWithoutWeeks);
}

get durationInSeconds() {
Expand Down

0 comments on commit 97516f4

Please sign in to comment.