Skip to content

Commit

Permalink
Merge pull request #415 from bcgov/ofm-hotfix-to-main
Browse files Browse the repository at this point in the history
added a day
  • Loading branch information
jenbeckett authored Nov 6, 2024
2 parents 377df33 + a048a66 commit 94e3283
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions frontend/src/views/supp-allowances/SupplementaryFormView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
</AppButton>
</v-col>
</v-row>
<v-row v-if="fundingExpiryDate">

<v-row v-if="fundingExpiryDate != 'Invalid Date'">
<v-col cols="12">
<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>
</v-col>
Expand Down Expand Up @@ -203,7 +204,7 @@ import moment from 'moment'
const DAYS_BEFORE_TERM_EXPIRES = 1
const DAYS_BEFORE_NEXT_TERM_ENABLED = 120
const TWO_YEARS = 730
const TWO_YEARS = 732
export default {
name: 'SupplementaryFormView',
Expand Down Expand Up @@ -557,7 +558,7 @@ export default {
const today = new Date()
const formattedEndDate = moment(this.fundingAgreement?.endDate).endOf('day').toDate()
const formattedStartDate = new Date(this.fundingAgreement.startDate)
const daysOfTerm = moment.duration(moment(formattedEndDate).diff(moment(formattedStartDate))).asDays()
const daysOfTerm = Math.floor(moment.duration(moment(formattedEndDate).diff(moment(formattedStartDate))).asDays())
let termTwoEndDate
let termOneEndDate
Expand Down

0 comments on commit 94e3283

Please sign in to comment.