Hi Leslie,
Our WSAPI does not include methods or functions to perform date calculations like you reference above. That being said, you could achieve this by first calculating the date range in question using your custom written application's programming language, then using the Query Expression Operators available tor the dateTime attribute in question.
For example:
To get a list of defects where the OpenedDate attribute is anytime this year, the following request would work:
https://rally1.rallydev.com/slm/webservice/v2.0/defect?workspace=https://rally1.rallydev.com/slm/webservice/v2.0/workspace/5555555555555&query=(( OpenedDate > "2016-01-01" ) and ( OpenedDate < "2016-12-31" ))&fetch=true&start=1&pagesize=20
I took out the URL encoding to make it easier to read and the workspace id is invalid.
To get the dates for the query above use your programming languages's methods. Some pseudo code below:
String startDate = getFirstDateInYear('2016');
String endDate = getLastDateInYear('2016');
...
...
...
//Now run the commands to send the following request to rally:
https://rally1.rallydev.com/slm/webservice/v2.0/defect?workspace=https://rally1.rallydev.com/slm/webservice/v2.0/workspace/5555555555555&query=(( OpenedDate > startDate ) and ( OpenedDate < endDate ))&fetch=true&start=1&pagesize=20
Does that help? I see you logged a support ticket, so I will send this information to you through that ticket also.