It was written between September 1501 and March 1502, with additions until about 1505.
It was written over a span of time between September 1501 and March 1502, with additional revisions completed by about 1505.