var time;
var now = new Date(Date.now());
if (timeFrame === AllReadTypes.day) {
now.setDate(now.getDate() - 1);
time = '' + now.getTime() * 1000;
} else if (timeFrame === AllReadTypes.week) {
now.setDate(now.getDate() - 7);
time = '' + now.getTime() * 1000;
} else if (timeFrame === AllReadTypes.weeks) {
now.setDate(now.getDate() - 14);
time = '' + now.getTime() * 1000;
} else {
time = unreadCounts[i].newestItemTimestampUsec;
}
However I want to double check - is this the right time? Should I do something else?