Skip to content

Commit 94e3283

Browse files
authored
Merge pull request #415 from bcgov/ofm-hotfix-to-main
added a day
2 parents 377df33 + a048a66 commit 94e3283

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

frontend/src/views/supp-allowances/SupplementaryFormView.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
</AppButton>
3131
</v-col>
3232
</v-row>
33-
<v-row v-if="fundingExpiryDate">
33+
34+
<v-row v-if="fundingExpiryDate != 'Invalid Date'">
3435
<v-col cols="12">
3536
<div v-if="!nextTermActive">If you apply for and receive funding in the current year of your funding agreement, the funds must be used by {{ format.formatDateToUTC(fundingExpiryDate) }}</div>
3637
</v-col>
@@ -203,7 +204,7 @@ import moment from 'moment'
203204
204205
const DAYS_BEFORE_TERM_EXPIRES = 1
205206
const DAYS_BEFORE_NEXT_TERM_ENABLED = 120
206-
const TWO_YEARS = 730
207+
const TWO_YEARS = 732
207208
208209
export default {
209210
name: 'SupplementaryFormView',
@@ -557,7 +558,7 @@ export default {
557558
const today = new Date()
558559
const formattedEndDate = moment(this.fundingAgreement?.endDate).endOf('day').toDate()
559560
const formattedStartDate = new Date(this.fundingAgreement.startDate)
560-
const daysOfTerm = moment.duration(moment(formattedEndDate).diff(moment(formattedStartDate))).asDays()
561+
const daysOfTerm = Math.floor(moment.duration(moment(formattedEndDate).diff(moment(formattedStartDate))).asDays())
561562
let termTwoEndDate
562563
let termOneEndDate
563564

0 commit comments

Comments
 (0)