Itenso TimePeriod library: change dates for TimePeriod

It took me a while to figure out how to change Start and End dates on an instance of TimePeriod. There are many functions to shrink and expand start and end dates, move the period by a certain time span, but I could not find anything that would just change .Start and .End.
Obviously you can do this:

timePeriod.Start = new DateTime(1999, 7, 9);
timePeriod.End = new DateTime(2012, 7, 9);

But this can lead to an exception if you are trying to move timeperiod to the future: Say start was on 1 Jan 2000, and on 1 Feb 2000. Then you give it .Start = 1 June 2000 and you get an exception saying “date out of range blah-blah”. That is because you are trying make start after end. You can swap assignment around, assign .End first then .Start. But you still can get an exception if you try to move the period to the past.

Instead, use .Setup method:

timePeriod.Setup(new DateTime(1999, 7, 9), new DateTime(2012, 7, 9));

And this should change your dates safely.

Disclaimer: I have not checked the source code, and not sure if that somehow ignores some internal mechanisms. So before blaming me that .Setup does not work, check with the author.