Skip to content

Commit

Permalink
fix: switch to valueof when doing unix conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
brobro10000 committed Sep 25, 2024
1 parent e7aaa47 commit 3bb3ba3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/learner-credit-management/data/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,8 @@ const isStartDateWithinThreshold = ({ enrollStart, start, subsidyExpirationDatet
if (!start && !enrollStart) {
return true;
}
const timeStampStartDate = dayjs(start).unix() || MAX_MILLISECONDS;
const timeStampEnrollStartDate = dayjs(enrollStart).unix() || MAX_MILLISECONDS;
const timeStampStartDate = dayjs(start).valueOf() || MAX_MILLISECONDS;
const timeStampEnrollStartDate = dayjs(enrollStart).valueOf() || MAX_MILLISECONDS;
const earliestStartDate = Math.min(timeStampStartDate, timeStampEnrollStartDate);
return dayjs(
earliestStartDate,
Expand Down

0 comments on commit 3bb3ba3

Please sign in to comment.