Rounding to the nearest 15 minute interval. I was wondering if there is a way for me to round up or down to the last nearest 15 minute interval. i use this function but beetween H and H=15 minutes, i haven't no argument.
var now = new Date();
var year = now.getFullYear();
var hour = ("0" + now.getUTCHours()).slice(-2);
var day = ("0" + now.getDate()).slice(-2);
var month = ("0" + (now.getMonth() + 1)).slice(-2);
var minutes = ("0" + now.getMinutes()).slice(-2);
var imageUrl = 'image/type'+month+''+day+'.'+hour+''+minutes+'.png',