Skip to content

Commit

Permalink
Merge pull request #1579 from ORNL-AMO/issue-1548
Browse files Browse the repository at this point in the history
month degree day calcs start on first day of the month
  • Loading branch information
rmroot authored May 7, 2024
2 parents 6b1aebc + feadbd3 commit 6430c09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export class EditPredictorEntryComponent {
updatedPredictorIds.push(hddPredictor.id);
}
}
}else{
} else {
hasWeatherOverride = true;
}
}
Expand Down Expand Up @@ -204,7 +204,7 @@ export class EditPredictorEntryComponent {
this.hasWeatherOverride = true;
}

async revertManualWeatherData(){
async revertManualWeatherData() {
this.predictorEntry.predictors.forEach(predictor => {
if (predictor.predictorType == 'Weather') {
predictor.weatherOverride = false;
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/helper-services/degree-days.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class DegreeDaysService {
let previousDryBulbTemp: number;
if (i == 0) {
let startDate: Date = new Date(localClimatologicalDataMonth[i].DATE);
previousDate = new Date(startDate.getFullYear(), startDate.getMonth(), startDate.getDate(), 0, 0);
previousDate = new Date(startDate.getFullYear(), startDate.getMonth(), 1, 0, 0);
previousDryBulbTemp = localClimatologicalDataMonth[i].HourlyDryBulbTemperature;
} else {
previousDate = new Date(localClimatologicalDataMonth[i - 1].DATE)
Expand Down

0 comments on commit 6430c09

Please sign in to comment.