is there a jQuery plugin or JS code for time durations?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Django
    So Fucking Banned
    • Jul 2010
    • 2578

    #1

    is there a jQuery plugin or JS code for time durations?

    This is what I'm looking for

    from 1 minute 7 seconds to 67 seconds
  • Why
    MFBA
    • Mar 2003
    • 7230

    #2
    Originally posted by Django
    This is what I'm looking for

    from 1 minute 7 seconds to 67 seconds
    why does it need to be in JS?

    Comment

    • fris
      Too lazy to set a custom title
      • Aug 2002
      • 55679

      #3
      Originally posted by Django
      This is what I'm looking for

      from 1 minute 7 seconds to 67 seconds
      if its for wordpress you can do this with built in functions.

      Code:
      <?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?>
      but if you want jquery here is a couple.

      http://pragmaticly.github.com/smart-time-ago/

      http://timeago.yarp.com/
      Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

      Comment

      • Django
        So Fucking Banned
        • Jul 2010
        • 2578

        #4
        Originally posted by fris
        if its for wordpress you can do this with built in functions.

        Code:
        <?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?>
        but if you want jquery here is a couple.

        http://pragmaticly.github.com/smart-time-ago/

        http://timeago.yarp.com/

        no it's for mechbunny, I'm going to read and try

        thanks

        Comment

        • Django
          So Fucking Banned
          • Jul 2010
          • 2578

          #5
          Originally posted by Why
          why does it need to be in JS?
          no, I thought about JS. if you know a better solution please let me know.

          Comment

          • fris
            Too lazy to set a custom title
            • Aug 2002
            • 55679

            #6
            Originally posted by Django
            no, I thought about JS. if you know a better solution please let me know.
            if you want something you can plug into mechbunny, you could do a php function which you could just call for in your template.

            http://css-tricks.com/snippets/php/time-ago-function/
            Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

            Comment

            • potter
              Confirmed User
              • Dec 2004
              • 6559

              #7
              Originally posted by Django
              This is what I'm looking for

              from 1 minute 7 seconds to 67 seconds
              multiple minutes by 60, add to seconds?

              Comment

              • Django
                So Fucking Banned
                • Jul 2010
                • 2578

                #8
                Originally posted by potter
                multiple minutes by 60, add to seconds?
                indeed that's it.


                thanks fris

                Comment

                Working...