jintervals
jintervals copied to clipboard
Make seconds argument optional - return formatting function
Currently it's like that:
jintervals(seconds, format);
I would like to make the seconds argument optional, so that calling jintervals with just a format string would give me a function that I could use over and over:
var format = jintervals("{Days}");
for (var i=0; i<data.length; i++) {
alert( format(data[i]) );
}
But to really do that correctly, I have to switch the order of arguments:
jintervals(format, seconds);
Which means it will be backwards-incompatible change.