is.night function

determines if measurement was taken during the night