Skip to content

Commit 5d6a6a9

Browse files
committed
#4 : bug : Wrong quarter ID in "date" files
1 parent efbf711 commit 5d6a6a9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

DatabaseGenerator/Engine_Setup.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ private static List<DateExtended> GenerateDateExt(DateTime dt1, DateTime dt2)
209209

210210
while (true)
211211
{
212-
int quarter = dt1.Month / 4 + 1;
212+
int quarter = (dt1.Month - 1) / 3 + 1;
213213
string quarterStr = $"Q{quarter}";
214214
bool isHoliday = dt1.DayOfWeek == DayOfWeek.Saturday || dt1.DayOfWeek == DayOfWeek.Sunday || IsFederalHoliday(dt1);
215215
if (!isHoliday) workingDayNumber++;
@@ -376,7 +376,7 @@ private void DistributeCustomersAmongClusters(Random rng)
376376
CustomerCluster cc = _customerClusters[i];
377377
cc.CustomersFast = new CustomerListFast(tempCustomersPerCluster[i]);
378378
Logger.Info($"Cluster: {cc.ClusterID} ({cc.CustomersWeight}) --> {cc.CustomersFast.Count}");
379-
}
379+
}
380380
}
381381

382382

0 commit comments

Comments
 (0)