daterangepicker

get next week start and end using jquery and moment js

血红的双手。 提交于 2019-11-28 04:55:39
I searched for this question and found there is a no answer on Stackoverflow.. So I decided to answer it... This question helps if you need to get the start/end of next/last week with Monday as start of week. A little late to the party but here is the simplest way I've found to express starts/ends of weeks. The isoWeek argument starts weeks on Monday according to the ISO 8601 , while week starts weeks depending on your locale (so probably either Sunday or Monday). This week: moment().startOf('isoWeek') moment().endOf('isoWeek') Next week: moment().add(1, 'weeks').startOf('isoWeek') moment()

get next week start and end using jquery and moment js

百般思念 提交于 2019-11-27 05:28:07
问题 I searched for this question and found there is a no answer on Stackoverflow.. So I decided to answer it... This question helps if you need to get the start/end of next/last week with Monday as start of week. 回答1: A little late to the party but here is the simplest way I've found to express starts/ends of weeks. The isoWeek argument starts weeks on Monday according to the ISO 8601, while week starts weeks depending on your locale (so probably either Sunday or Monday). This week: moment()