I'm trying to figure out a function to filter image by quarter (January - March, Arpil - July, etc) of Landsat Image Collection to calculate NDVI for each three-month period between 2013 and 2018. My purpose is to adjust the code this link https://code.earthengine.google.com/f590c95bd17454789cde0eb8d1be4850 to compute NDVI in quarter instead of five-year period.
I am planning to add this code below, however i don't know exactly it could be possible or not.
var start = ee.Date('01-01-2013');
var end = ee.Date('31-03-2013');
var date_range = ee.DateRange(start,end);
var fnc = function(d1) {
var S1 = ee.ImageCollection("LANDSAT/LC08/C01/T1_SR")
.filterDate(date_range)
.filterBounds(table)
return(S1.first())
}
var quarter1 = ee.ImageCollection(dates.map(fnc));
print(mt)