title: Get Last Day of Persian Month + Solution
body: <p>after looking web, i cant find any function to do this,
  i have personal solution that is work.
  Maybe it will be useful for someone.</p>
  <p>**using Moment Plugin to Convert date.
  ***moment(currentPersianDate).clone().endof('month').format('YYYY/MM/DD') =&gt; not Work in Persian Date</p>
  <pre><code>  function GetLastDayOfPersianMonth(calendar) {
              const currentDate = new Date();
              const currentPersianDate = moment(currentDate).locale('fa').format('YYYY/M/D');
              const splitDate = currentPersianDate.split(&quot;/&quot;);
              const year = splitDate[0];
              const month = splitDate[1];
              const lastDayOfPersianMonth = CalculateLeapYear(month, year);
      
              const endPersianMonth = year + &quot;/&quot; + month + &quot;/&quot; + lastDayOfPersianMonth;
          };
  
      function CalculateLeapYear(month, year) {
              if (month &lt;= 6) {
                  return 31;
              }
              if (month &gt; 6 &amp;&amp; month &lt; 12) {
                  return 30;
              }
  
              const leapMatch = [1, 5, 9, 13, 17, 22, 26, 30];
              const number = year % 33;
              const isLeap = leapMatch.includes(number);
             
              if (month == 12 &amp;&amp; !isLeap) {
                  return 29;
              }
              if (month == 12 &amp;&amp; isLeap) {
                  return 30;
              }
          }
  </code></pre>