如何从几个月减去一天?

时间:2018-06-05 09:03:46

标签: javascript angular typescript

如何从 this.maxIntervalDurationInMonts 中减去最后一天

 private customIntervalDisable(startDate: string, amount: string, method: string): boolean {
    return this.maxIntervalDurationInMonths !== null
        ? moment()[amount](this.maxIntervalDurationInMonths, 'month')[method](startDate)
        : false;
}

1 个答案:

答案 0 :(得分:0)

在此上添加“.subtract(1,'day')”:( this.maxIntervalDurationInMonths,'month')