constructing sequence of dates taking into account the calendar year

2 views (last 30 days)
antonet on 24 May 2012
Hi all,
I want to construct a sequence of dates every 28 days. for example
I can use the command
cellstr(datestr(datenum({'02/11/08'},'dd/mm/yy')+(0:28:38*28 ),'dd/mm/yy'))
but the problem is that this command does not take int account that some months have 29 days and some others 30 or 31 days. So the clalendar year matters. Any thoughts?thanks

Accepted Answer

Oleg Komarov
Oleg Komarov on 24 May 2012
Adjust the length of the months - 11:100 - to your needs.

More Answers (0)


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by