How to get date object prior 3 months from current date in Typescript

后端 未结 0 1500
醉梦人生
醉梦人生 2021-01-06 10:01

I am trying to get the date object before 3 months from current date like this.

toDate = new Date();
fromDate  = this.toDate.getMonth() - 3;

相关标签:
回答
  • 消灭零回复
提交回复
热议问题