Detect all midnights in a time series
g.detecmidnight.RdDetect all midnights in a time series
Value
Output of the function is list containing the following objects:
firstmidnight = timestamp of first midnight
firstmidnighti = index of first midnight
lastmidnight = timestamp of last midnight
lastmidnighti = index of last midnight
midnights = timestamps of midnights
midnightsi = indeces of midnights