How to calculate the period of a lunar mansion? What is the period of a lunar mansion or station referring to and how is it calculated? Wikipedia says the following:

A lunar station, also called a lunar mansion or lunar house, is a segment of the ecliptic through which the Moon passes in its orbit around the Earth. The concept was used by several ancient cultures as part of their calendrical system.

For example, the period days of first lunar station is from April 23rd to May 10th and the period of the last lunar station is the days of April 20th, April 21st and April 22nd.
Please note that the following table is included in the Wikipedia page of Lunar Mansions and also the beginning day of each period is only listed here. For example the duration of the first mansion's period is from April 5th to April 18th. It's from April 18th to May 1st for the second Mansion and so on.
If I understand the concept of &quot;mansion&quot; correct, it is similar to an astrological sign, and astrononomically simply refering to a certain zone in which a certain object (here: the Moon) can be seen on the sky.
More specifically, a Lunar station - [Manazilu ʾl-Qamar منازل القمر] according to Islamic astronomical system seems a certain sector of the sky and the sky is divided into 28 of theses sectors. This defines a celestial coordinate system with $x$-axis being the ecliptic, the celestial longitude. The longitude is measured in degrees east of the vernal equinox (the ascending intersection of the ecliptic and equator):
An algorithm to determine the Lunar station at a given time would have as input parameter only the position of the Moon on the sky (actually only the Ecliptic longitude $\lambda$ of the Moon) and check in which interval $\lambda$ lies. The lower boundary of each mansion is given in the 3rd column in the Wikipedia-table shown in the question in a rather inconvenient format, namely in degrees and minutes from a start of a zodiac symbol.
In a first step, you would have to convert the Wikipedia list to a intervals with real celestial longitudes. You would end up with 28 if-clauses in your algorithm to determine a string $s$ containing the name of the lunar mansion:
$s_{\rm lunar~mansion}(\lambda) = \left\{ \substack{ {An-Nath} {\rm ~if~}
  0 \leq \lambda &lt; 12^\circ 51' \\
\vdots \\
Butnu 'l-Hut {\rm ~if~} 0 \leq \lambda &lt; 347^\circ9' = 330^\circ +17^\circ 9' 
}\right.$
Here we used the fact that Pisces starts at $330^\circ$ celestial longitude.
Since you are after the begin and end dates for a each lunar mansion you have to calculate at which time the Moon celestial longitude $\lambda$ equals to the boundaries of the 28 intervals. I would do it vice versa and calculate for each day  of the year at 00:00:01 local time the longitude of Moon and then use $s(\lambda)$. You will end up with a table of 365 or 366 date- string-pairs. In the last step, you discard all lines of the table where a string repeats and reduce the list to 28 entries, with the start dates in the first column.