update no add 1 day
This commit is contained in:
parent
ea74db7005
commit
028d984ad9
1 changed files with 2 additions and 2 deletions
|
|
@ -116,7 +116,7 @@ export async function calculateGovAge(profileId: string, type: string) {
|
|||
years: totalYears1,
|
||||
months: totalMonths1,
|
||||
days: totalDays1,
|
||||
} = calculateDuration(firstStartDate, firstEndDate, true);
|
||||
} = calculateDuration(firstStartDate, firstEndDate);
|
||||
|
||||
const records_middle = await AppDataSource.getRepository(ProfileSalary).find({
|
||||
where: {
|
||||
|
|
@ -145,7 +145,7 @@ export async function calculateGovAge(profileId: string, type: string) {
|
|||
if (current.isGovernment === true) {
|
||||
const startDate = new Date(current.dateGovernment);
|
||||
const endDate = next ? new Date(next.dateGovernment) : new Date();
|
||||
const { years, months, days } = calculateDuration(startDate, endDate, true);
|
||||
const { years, months, days } = calculateDuration(startDate, endDate);
|
||||
|
||||
totalYears2 += years;
|
||||
totalMonths2 += months;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue