Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make seconds argument optional - return formatting function #4

Open
GoogleCodeExporter opened this issue May 26, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

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.

Original issue reported on code.google.com by [email protected] on 21 May 2009 at 1:57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant