# About the FAQ category

**URL:** <https://forum.robusta.ai/t/about-the-faq-category/25>\
**Category:** FAQ\
**Created:** [April 20, 2022, 3:39pm UTC](https://forum.robusta.ai/t/about-the-faq-category/25 "2022-04-20T15:39:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobustaRPA](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robusta.ai/robustarpa/32/11_2.png) [@RobustaRPA](https://forum.robusta.ai/u/RobustaRPA)\
**Post date:** [April 20, 2022, 3:39pm UTC](https://forum.robusta.ai/t/about-the-faq-category/25/1 "2022-04-20T15:39:48Z")

</div>

Find answers to some of the most common questions about Robusta RPA products and community initiatives here.

---

<div class="post-metadata">

**Author:** ![ilayda.ipar](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robusta.ai/ilayda.ipar/32/56_2.png) [@ilayda.ipar](https://forum.robusta.ai/u/ilayda.ipar)\
**Post date:** [July 18, 2022, 2:48pm UTC](https://forum.robusta.ai/t/about-the-faq-category/25/2 "2022-07-18T14:48:24Z")

</div>

Returns the date of the first day of the week in which the operation was performed.

⬇

```auto
var dt = new Date(); 
var month = [1,2,3,4,5,6,7,8,9,10,11,12];
var currentWeekDay = dt.getDay();
var toDay = dt.getDate();

 

var lessDays = currentWeekDay == 0 ? 6 : currentWeekDay - 1;

var wkStart = new Date(new Date(dt).setDate(dt.getDate() - lessDays));
var wkEnd = new Date(new Date(wkStart).setDate(wkStart.getDate() + 6));

 

var fday = wkStart.getDate();
var fmonth = month[wkStart.getMonth()];
var fyear = wkStart.getFullYear();

if(fmonth<10){
fmonth="0"+fmonth.toString();
if(toDay==1){
fday = "01";
}
}
else{
fmonth =fmonth;
}
var firstDate = fday.toString()+fmonth.toString()+fyear.toString(); 

execution.setVariable("firstDate",firstDate);

 
Output:  

 "firstDate : 4042022"

```
