# First day of the week

**URL:** <https://discuss.elastic.co/t/first-day-of-the-week/52628>\
**Category:** Kibana\
**Created:** [June 13, 2016, 3:09pm UTC](https://discuss.elastic.co/t/first-day-of-the-week/52628 "2016-06-13T15:09:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lore6673](https://avatars.discourse-cdn.com/v4/letter/l/e56c9b/32.png) [@lore6673](https://discuss.elastic.co/u/lore6673)\
**Post date:** [June 13, 2016, 3:09pm UTC](https://discuss.elastic.co/t/first-day-of-the-week/52628/1 "2016-06-13T15:09:50Z")

</div>

Hello

I'm trying to create a new visualization, vertical bar chart, with time in the x-axis.  
Here the request Kibana is doing:

{  
"query": {  
"filtered": {  
"query": {  
"query\_string": {  
"query": "\*",  
"analyze\_wildcard": true  
}  
},  
"filter": {  
"bool": {  
"must": [  
{  
"query": {  
"query\_string": {  
"analyze\_wildcard": true,  
"query": "MERCH\_YEAR:2016"  
}  
}  
}  
],  
"must\_not": []  
}  
}  
}  
},  
"size": 0,  
"aggs": {  
"2": {  
"date\_histogram": {  
"field": "DAY",  
"interval": "1w",  
"time\_zone": "Europe/Berlin",  
"min\_doc\_count": 1,  
"extended\_bounds": {  
"min": 1465829368033,  
"max": 1465830268033  
}  
},  
"aggs": {  
"3": {  
"terms": {  
"field": "ZONE",  
"size": 14,  
"order": {  
"\_term": "asc"  
}  
},  
"aggs": {  
"1": {  
"sum": {  
"field": "SALES\_EURO"  
}  
}  
}  
}  
}  
}  
}  
}

The aggregation considers Monday as first day of the week.

How can I change this behavior in order to have Sunday as first day of the week and to have sales metric aggregated from Sunday to Saturday for each week?

Thank you  
Lorenzo

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [June 14, 2016, 7:50pm UTC](https://discuss.elastic.co/t/first-day-of-the-week/52628/2 "2016-06-14T19:50:25Z")

</div>

According to the ISO 8601 standard, Monday is the official first day of the week. Notable exceptions to this are the US and Canada, which treat Sunday as the first day of the week.

> "time\_zone": "Europe/Berlin",

I suspect that because your timezone location is Berlin that the date parsing library we're using is falling back to the ISO 8601 standard, and thus you are seeing Monday as the first day of the week. I don't believe there's a workaround for this in Kibana currently. I'd encourage you to [open an issue](https://github.com/elastic/kibana/issues) to request this functionality, perhaps as an advanced setting or something.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:50pm UTC](https://discuss.elastic.co/t/first-day-of-the-week/52628/3 "2017-07-06T13:50:35Z")

</div>


