Jump to content
MakeWebGames

Minute Converter [NEEDED] Will Pay


Recommended Posts

Okay well I need a minute converter function made, I do not know the right technique to do it, so I am willing to pay.

 

I need it to be as simple as just doing this:

min_converter(60);

 

then it would ouput, of course 1 Hour.

 

But say I inputed 61, it would say 1 Hour(s) and 1 Minute(s) (the s in the () are there just incase you don't know how to make it without the S if there is only 1)

 

If its 1440 it would output 1 Day. If its 1441 it would output 1 Day and 1 Minute, if its 1501 it would output 1 Day, 1 Hour and 1 Minute.

 

The text of the output does not have to be exactly like that, but if you can make it like that, then that is a plus.

 

I would really only input 10080 minutes as the max which should output: 1 Week.

But if you can make it go up to years, then that is a big plus for me, so it would be like 1 year, and 1 month, or such, you get the point.

 

Anyways name a price but I am looking to pay around $7 if that is what its worth.

 

If you have questions, or are confused, read it again, if you still are confused, contact me.

 

Thanks guys, just message me on the forum or post on this thread.

Link to comment
Share on other sites

function min_converter($x) {
unset($uw,$ud,$uh,$um);
if(($x/10080) >= 1){ $w=floor($x/10080); $uw=$w." Week(s) "; $x=$x-(floor($x/10080)*10080);}
if(($x/1440) >= 1){ $d=floor($x/1440); $ud=$d." Day(s) "; $x=$x-(floor($x/1440)*1440);} 
if(($x/60) >= 1){ $h=floor($x/60); $uh=$h." Hour(s) "; $x=$x-(floor($x/60)*60);}
if($x >= 1){ $um=$x." Minute(s) "; }
return $uw.$ud.$uh.$um; }

 

should work :)

Edited by Death_
put it in [code] tags
Link to comment
Share on other sites

Thank you very much Death_, its not easy programming in the middle of the night, but you never gave up and you finished it that night for me.

I really appreciate you doing this for me, and even when I offered money you turned it down and programmed it for free :)

 

Thank you for programming this the same day I posted this thread, and thank you for not giving up, A++ man.

Edited by Blade Maker
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...