<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Print mondays between given dates</title><link>https://community.appian.com/discussions/f/general/21046/print-mondays-between-given-dates</link><description>Hi, 
 How can we print dates on mondays between the given start date and end date? 
 
 Please provide the code for it. 
 For Example: 
 Input: 
 Start Date: 24/May/2021 
 End Date: 25 June/2021 
 
 output: 
 31/May/2021 
 07/June/2021 
 14/June/2021 </description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Print mondays between given dates</title><link>https://community.appian.com/thread/82015?ContentTypeID=1</link><pubDate>Tue, 25 May 2021 15:28:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:19b3fd20-6740-4b97-8c0a-2af0e9a619a4</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;I also like the weekday() function for comparing days of the week as integers.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;a!forEach(
  items: ri!startDate+enumerate(ri!endDate-ri!startDate+1),
  expression: if(weekday(fv!item)=2,fv!item,{})
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Print mondays between given dates</title><link>https://community.appian.com/thread/82009?ContentTypeID=1</link><pubDate>Tue, 25 May 2021 14:00:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0446976f-3595-4a92-8338-b0f9cf5f14b3</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;The above solution posted by Ranjith would work except I don&amp;#39;t find the function &amp;quot;getDatesBetweenDate&amp;quot; anywhere - perhaps it&amp;#39;s in a plug-in that I&amp;#39;m not familiar with.&lt;/p&gt;
&lt;p&gt;The following OOB code might be slightly more flexible and uses a!forEach instead of the index/whereContains combo, which can be a bit easier to read at least.&lt;br /&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  local!numDays: tointeger(ri!enddate - ri!startDate) + 1,
  local!dates: a!forEach(
    enumerate(local!numDays),
    ri!startDate + fv!item
  ),
  
  a!flatten(
    a!forEach(
      local!dates,
      if(
        text(fv!item, &amp;quot;dddd&amp;quot;) &amp;lt;&amp;gt; &amp;quot;Monday&amp;quot;,
        {},
        a!map(
          date: fv!item,
          day: text(fv!item, &amp;quot;dddd&amp;quot;)
        )
      )
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Print mondays between given dates</title><link>https://community.appian.com/thread/81988?ContentTypeID=1</link><pubDate>Tue, 25 May 2021 12:51:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5b73ee40-1cf9-4e8c-bb29-d9d9873a33c3</guid><dc:creator>ranjith.shanmugam</dc:creator><description>&lt;p&gt;Hi Ayushimittal,&lt;/p&gt;
&lt;p&gt;Use Below Code&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!days: getdatesbetweendate(ri!startdate, ri!enddate),
  index(
    local!days,
    wherecontains(2, apply(weekday(_), local!days))
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>