This project is archived and is in readonly mode.

#886 ✓invalid
Crystark

$time in seconds

Reported by Crystark | April 21st, 2010 @ 09:26 AM

Allow time to return seconds

var $time = function(seconds){

var ms = Date.now ? Date.now():+new Date;
return seconds ? Math.floor(ms/1000):ms;

};

  • Easy to add.
  • Great function for using javascript and PHP together (PHP returns timestamps in seconds)
  • Will ease the task of converting to seconds for (i guess) alot of people.

Comments and changes to this ticket

  • Christoph Pojer

    Christoph Pojer April 28th, 2010 @ 05:03 PM

    • State changed from “new” to “invalid”

    We are not currently contemplating to add this functionality. Fortunately, as you stated, it is easy to implement if you need it.

    Note that in MooTools 1.3 $time has been removed in favor of Date.now()

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Pages