Skip to content

Commit f8a6ffc

Browse files
HSPEXP/HSPFOutputReports.vb
atcHspfSupport/atcConstituentTables.vb atcHspfSupport/atcHspfConstituentBudget.vb correct dates for monthly reports
1 parent 77f471e commit f8a6ffc

File tree

3 files changed

+42
-42
lines changed

3 files changed

+42
-42
lines changed

HSPEXP/HSPFOutputReports.vb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -697,9 +697,9 @@ Module HSPFOutputReports
697697
Dim lTempTim As New atcTimeseries
698698
Dim lDate(5) As Integer
699699
lTempTim = lTimeseries.Clone
700-
For iValue As Integer = 1 To lTempTim.numValues
701-
J2Date(lTempTim.Dates.Value(iValue), lDate)
702-
If lDate(1) < lReportStartMonth + 1 Or lDate(1) > lReportEndMonth + 1 Then 'pbd works for monthly output?
700+
For iValue As Integer = 0 To lTempTim.numValues
701+
J2Date(lTempTim.Dates.Value(iValue) - 0.001, lDate)
702+
If lDate(1) < lReportStartMonth Or lDate(1) > lReportEndMonth Then 'pbd works
703703
lTempTim.Value(iValue) = 0.0
704704
End If
705705
Next

atcHspfSupport/atcConstituentTables.vb

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2067,9 +2067,9 @@ Public Module atcConstituentTables
20672067
If aReportStartMonth <> 1 Or aReportEndMonth <> 12 Then
20682068
'if reporting for some months only
20692069
Dim lDate(5) As Integer
2070-
For iValue As Integer = 1 To lTimeseries.numValues
2071-
J2Date(lTimeseries.Dates.Value(iValue), lDate)
2072-
If lDate(1) < aReportStartMonth + 1 Or lDate(1) > aReportEndMonth + 1 Then
2070+
For iValue As Integer = 0 To lTimeseries.numValues
2071+
J2Date(lTimeseries.Dates.Value(iValue) - 0.001, lDate)
2072+
If lDate(1) < aReportStartMonth Or lDate(1) > aReportEndMonth Then
20732073
lTimeseries.Value(iValue) = 0.0
20742074
End If
20752075
Next
@@ -2108,9 +2108,9 @@ Public Module atcConstituentTables
21082108
If aReportStartMonth <> 1 Or aReportEndMonth <> 12 Then
21092109
'if reporting for some months only
21102110
Dim lDate(5) As Integer
2111-
For iValue As Integer = 1 To lTimeseries.numValues
2112-
J2Date(lTimeseries.Dates.Value(iValue), lDate)
2113-
If lDate(1) < aReportStartMonth + 1 Or lDate(1) > aReportEndMonth + 1 Then
2111+
For iValue As Integer = 0 To lTimeseries.numValues
2112+
J2Date(lTimeseries.Dates.Value(iValue) - 0.001, lDate)
2113+
If lDate(1) < aReportStartMonth Or lDate(1) > aReportEndMonth Then
21142114
lTimeseries.Value(iValue) = 0.0
21152115
End If
21162116
Next
@@ -2151,9 +2151,9 @@ Public Module atcConstituentTables
21512151
If aReportStartMonth <> 1 Or aReportEndMonth <> 12 Then
21522152
'if reporting for some months only
21532153
Dim lDate(5) As Integer
2154-
For iValue As Integer = 1 To ltimeseries.numValues
2155-
J2Date(ltimeseries.Dates.Value(iValue), lDate)
2156-
If lDate(1) < aReportStartMonth + 1 Or lDate(1) > aReportEndMonth + 1 Then
2154+
For iValue As Integer = 0 To ltimeseries.numValues
2155+
J2Date(ltimeseries.Dates.Value(iValue) - 0.001, lDate)
2156+
If lDate(1) < aReportStartMonth Or lDate(1) > aReportEndMonth Then
21572157
ltimeseries.Value(iValue) = 0.0
21582158
End If
21592159
Next
@@ -2194,9 +2194,9 @@ Public Module atcConstituentTables
21942194
If aReportStartMonth <> 1 Or aReportEndMonth <> 12 Then
21952195
'if reporting for some months only
21962196
Dim lDate(5) As Integer
2197-
For iValue As Integer = 1 To lTimeseries.numValues
2198-
J2Date(lTimeseries.Dates.Value(iValue), lDate)
2199-
If lDate(1) < aReportStartMonth + 1 Or lDate(1) > aReportEndMonth + 1 Then
2197+
For iValue As Integer = 0 To lTimeseries.numValues
2198+
J2Date(lTimeseries.Dates.Value(iValue) - 0.001, lDate)
2199+
If lDate(1) < aReportStartMonth Or lDate(1) > aReportEndMonth Then
22002200
lTimeseries.Value(iValue) = 0.0
22012201
End If
22022202
Next
@@ -2240,9 +2240,9 @@ Public Module atcConstituentTables
22402240
If aReportStartMonth <> 1 Or aReportEndMonth <> 12 Then
22412241
'if reporting for some months only
22422242
Dim lDate(5) As Integer
2243-
For iValue As Integer = 1 To lTimeseries.numValues
2244-
J2Date(lTimeseries.Dates.Value(iValue), lDate)
2245-
If lDate(1) < aReportStartMonth + 1 Or lDate(1) > aReportEndMonth + 1 Then
2243+
For iValue As Integer = 0 To lTimeseries.numValues
2244+
J2Date(lTimeseries.Dates.Value(iValue) - 0.001, lDate)
2245+
If lDate(1) < aReportStartMonth Or lDate(1) > aReportEndMonth Then
22462246
lTimeseries.Value(iValue) = 0.0
22472247
End If
22482248
Next
@@ -2285,9 +2285,9 @@ Public Module atcConstituentTables
22852285
If aReportStartMonth <> 1 Or aReportEndMonth <> 12 Then
22862286
'if reporting for some months only
22872287
Dim lDate(5) As Integer
2288-
For iValue As Integer = 1 To lTimeseries.numValues
2289-
J2Date(lTimeseries.Dates.Value(iValue), lDate)
2290-
If lDate(1) < aReportStartMonth + 1 Or lDate(1) > aReportEndMonth + 1 Then
2288+
For iValue As Integer = 0 To lTimeseries.numValues
2289+
J2Date(lTimeseries.Dates.Value(iValue) - 0.001, lDate)
2290+
If lDate(1) < aReportStartMonth Or lDate(1) > aReportEndMonth Then
22912291
lTimeseries.Value(iValue) = 0.0
22922292
End If
22932293
Next
@@ -2327,9 +2327,9 @@ Public Module atcConstituentTables
23272327
If aReportStartMonth <> 1 Or aReportEndMonth <> 12 Then
23282328
'if reporting for some months only
23292329
Dim lDate(5) As Integer
2330-
For iValue As Integer = 1 To lTimeseries.numValues
2331-
J2Date(lTimeseries.Dates.Value(iValue), lDate)
2332-
If lDate(1) < aReportStartMonth + 1 Or lDate(1) > aReportEndMonth + 1 Then
2330+
For iValue As Integer = 0 To lTimeseries.numValues
2331+
J2Date(lTimeseries.Dates.Value(iValue) - 0.001, lDate)
2332+
If lDate(1) < aReportStartMonth Or lDate(1) > aReportEndMonth Then
23332333
lTimeseries.Value(iValue) = 0.0
23342334
End If
23352335
Next
@@ -2962,9 +2962,9 @@ Public Module atcConstituentTables
29622962
If aReportStartMonth <> 1 Or aReportEndMonth <> 12 Then
29632963
'if reporting for some months only
29642964
Dim lDate(5) As Integer
2965-
For iValue As Integer = 1 To lTimeseries.numValues
2966-
J2Date(lTimeseries.Dates.Value(iValue), lDate)
2967-
If lDate(1) < aReportStartMonth + 1 Or lDate(1) > aReportEndMonth + 1 Then
2965+
For iValue As Integer = 0 To lTimeseries.numValues
2966+
J2Date(lTimeseries.Dates.Value(iValue) - 0.001, lDate)
2967+
If lDate(1) < aReportStartMonth Or lDate(1) > aReportEndMonth Then
29682968
lTimeseries.Value(iValue) = 0.0
29692969
End If
29702970
Next

atcHspfSupport/atcHspfConstituentBudget.vb

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,9 @@ Public Module ConstituentBudget
296296
If aReportStartMonth <> 1 Or aReportEndMonth <> 12 Then
297297
'if reporting for some months only
298298
Dim lDate(5) As Integer
299-
For iValue As Integer = 1 To lTimeseries.numValues
300-
J2Date(lTimeseries.Dates.Value(iValue), lDate)
301-
If lDate(1) < aReportStartMonth + 1 Or lDate(1) > aReportEndMonth + 1 Then
299+
For iValue As Integer = 0 To lTimeseries.numValues
300+
J2Date(lTimeseries.Dates.Value(iValue) - 0.001, lDate)
301+
If lDate(1) < aReportStartMonth Or lDate(1) > aReportEndMonth Then
302302
lTimeseries.Value(iValue) = 0.0
303303
End If
304304
Next
@@ -493,9 +493,9 @@ Public Module ConstituentBudget
493493
If aReportStartMonth <> 1 Or aReportEndMonth <> 12 Then
494494
'if reporting for some months only
495495
Dim lDate(5) As Integer
496-
For iValue As Integer = 1 To lTimeseries.numValues
497-
J2Date(lTimeseries.Dates.Value(iValue), lDate)
498-
If lDate(1) < aReportStartMonth + 1 Or lDate(1) > aReportEndMonth + 1 Then
496+
For iValue As Integer = 0 To lTimeseries.numValues
497+
J2Date(lTimeseries.Dates.Value(iValue) - 0.001, lDate)
498+
If lDate(1) < aReportStartMonth Or lDate(1) > aReportEndMonth Then
499499
lTimeseries.Value(iValue) = 0.0
500500
End If
501501
Next
@@ -724,9 +724,9 @@ Public Module ConstituentBudget
724724
If aReportStartMonth <> 1 Or aReportEndMonth <> 12 Then
725725
'if reporting for some months only
726726
Dim lDate(5) As Integer
727-
For iValue As Integer = 1 To ltimeseries.numValues
728-
J2Date(ltimeseries.Dates.Value(iValue), lDate)
729-
If lDate(1) < aReportStartMonth + 1 Or lDate(1) > aReportEndMonth + 1 Then
727+
For iValue As Integer = 0 To ltimeseries.numValues
728+
J2Date(ltimeseries.Dates.Value(iValue) - 0.001, lDate)
729+
If lDate(1) < aReportStartMonth Or lDate(1) > aReportEndMonth Then
730730
ltimeseries.Value(iValue) = 0.0
731731
End If
732732
Next
@@ -997,9 +997,9 @@ Public Module ConstituentBudget
997997
If aReportStartMonth <> 1 Or aReportEndMonth <> 12 Then
998998
'if reporting for some months only
999999
Dim lDate(5) As Integer
1000-
For iValue As Integer = 1 To ltimeseries.numValues
1001-
J2Date(ltimeseries.Dates.Value(iValue), lDate)
1002-
If lDate(1) < aReportStartMonth + 1 Or lDate(1) > aReportEndMonth + 1 Then
1000+
For iValue As Integer = 0 To ltimeseries.numValues
1001+
J2Date(ltimeseries.Dates.Value(iValue) - 0.001, lDate)
1002+
If lDate(1) < aReportStartMonth Or lDate(1) > aReportEndMonth Then
10031003
ltimeseries.Value(iValue) = 0.0
10041004
End If
10051005
Next
@@ -1675,9 +1675,9 @@ Public Module ConstituentBudget
16751675
If aReportStartMonth <> 1 Or aReportEndMonth <> 12 Then
16761676
'if reporting for some months only
16771677
Dim lDate(5) As Integer
1678-
For iValue As Integer = 1 To ltimeseries.numValues
1679-
J2Date(ltimeseries.Dates.Value(iValue), lDate)
1680-
If lDate(1) < aReportStartMonth + 1 Or lDate(1) > aReportEndMonth + 1 Then
1678+
For iValue As Integer = 0 To ltimeseries.numValues
1679+
J2Date(ltimeseries.Dates.Value(iValue) - 0.001, lDate)
1680+
If lDate(1) < aReportStartMonth Or lDate(1) > aReportEndMonth Then
16811681
ltimeseries.Value(iValue) = 0.0
16821682
End If
16831683
Next

0 commit comments

Comments
 (0)