GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   is there a jQuery plugin or JS code for time durations? (https://gfy.com/showthread.php?t=1078817)

Django 08-22-2012 07:34 AM

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 08-22-2012 09:41 AM

Quote:

Originally Posted by Django (Post 19139205)
This is what I'm looking for

from 1 minute 7 seconds to 67 seconds

why does it need to be in JS?

fris 08-22-2012 09:49 AM

Quote:

Originally Posted by Django (Post 19139205)
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/

Django 08-22-2012 10:58 AM

Quote:

Originally Posted by fris (Post 19139449)
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 :thumbsup

Django 08-22-2012 01:47 PM

Quote:

Originally Posted by Why (Post 19139429)
why does it need to be in JS?

no, I thought about JS. if you know a better solution please let me know.

fris 08-22-2012 02:42 PM

Quote:

Originally Posted by Django (Post 19139926)
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/

potter 08-22-2012 09:47 PM

Quote:

Originally Posted by Django (Post 19139205)
This is what I'm looking for

from 1 minute 7 seconds to 67 seconds

multiple minutes by 60, add to seconds? :upsidedow

Django 08-23-2012 12:28 AM

Quote:

Originally Posted by potter (Post 19140523)
multiple minutes by 60, add to seconds? :upsidedow

indeed that's it.


thanks fris


All times are GMT -7. The time now is 09:26 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123