What time do the startOfWeek and endOfWeek functions start and end?


I have setup a JQL to bring me back a count of issues that were in "On Hold" during the course of last week. Query is as such:

project= XXX AND issueType = project AND status was in ("On Hold") DURING (startOfWeek(-1w), endOfWeek(-1w))

This currently returns 8 issues when I am expecting 9. On investigation i discovered the the one issue that was not counted was updated on sunday evening at about 10pm.

Question: What time does startOfWeek() start and endOfWeek() end? Does it run from Monday 00:00 to sunday 23:59?

Note: Our JIRA locale is set to GMT +2. We are in South Africa.

Hope you clever buggers can help. :)


2 answers

1 accepted

Hi Jack,

startOfWeek() starts Sunday 00:00 h

endOfweek() is Saturday just before Midnight



Thanks for the feedback Udo. Is this configurable that the start of the week can be set to Monday 00:00 and end of the week be Sunday midnight? This would make it easier for us.

Thanks again Udo and thanks as well to Bharadwaj. I will pass this info onto our administrators to get it changed.

This is an easy one, no need for admin.  If you want the current week to be Mon-Sun, use "startOfWeek(1d), endOfWeek(1d)".  If you want the previous week to be Mon-Sun, use "(startOfWeek(-6d), endOfWeek(-6d))", and so on.  smile

This was incredibly helpful, thanks!

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,342 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot