I have a list coming from service. here is the sample json data coming from json
[
{
"Date":"2015-12-09T17:03:56.869-06:00",
"id":"1",
"itemCode":"B001"
"itemName":""
},
{
"Date":"2015-12-02T17:03:56.869-06:00",
"id":"1",
"itemCode":"B001"
"itemName":""
}...
]
In the view, based on the Date value, I have to display Today(if it is Todays date),then yesterday(if it is yesterdays' Date), and then every day of the week(Tuesday,Monday,Sunday).
Once the list gets to the previous Sunday, should display "Last Week", once the list gets to two Sundays ago, should display, "Two Weeks Ago" and so on up until three weeks. after 3 weeks of lists, it should display "last Month". after the 8th previous Sunday, the header called "Two Months Ago"and so on until 6 months ago. we are getting lists data from last 6 months.
How to get these kind of functionality? is there any filters or built-in methods?