【发布时间】:2021-06-05 18:15:23
【问题描述】:
【问题讨论】:
-
1.获取当月天数。 2. 查找当天 3. 减去
-
您的问题需要进一步完善。但在这里你可以得到你想要的:code-sample.com/2015/07/remaining-days-in-current-month-in.html
标签: javascript reactjs react-native frontend
【问题讨论】:
标签: javascript reactjs react-native frontend
now = new Date();
// Tota number of days in current month
const totalDays = new Date(now.getFullYear(), now.getMonth()+1, 0).getDate();
// Today's day
const today = now.getDate();
// Remaining days of the month
const remainingDays = totalDays - today;
【讨论】: