This function is something I needed as I required a way to convert a time-span, in seconds, into a representative string. I also wanted something that produced a gramatically correct string. This was not going to be the easiest function to make, but I cracked at it and came out with this result, and works fine with positive values. The edit I have on my computer can handle negative values.
Sorting out the different numeric values to be used in the string was easy enough, but figuring out the code to sort the numbers into a grammatically accurate string was difficult. I wanted the function to be short and tidy, so I decided to use the ternary operator, and as a result created some amazingly long lines.
The section of code which works out the string is by far the longest part of the function, and the was the most difficult to create. It was tested and edited many times, to make sure that absolutely every possible variation worked! Thankfully, it works, and I made it into a generic function so that it can be used anywhere.
Below we have compiled a list of 101 tips to help you improve your photography. You may know some of them already but were confident that you'll find at least a few gems in there! Go get yourself a cup of coffee and make sure you are sitting comfortably!
Spencer Kelly visits the Royal Albert Hall to see a digital graffiti wall where you can virtual spray paint to your heart's content and email the results to yourself.
When it comes to community spirit, `Rushy is a shining example. From participating in devmeets, to providing positive encouragement to other artists, `Rushy can always be found demonstrating what it really takes to be a true deviant. It's without any hesitation that we are delighted to award the Deviousness Award for July 2009 to `RushyRead More
Devious Comments
Comments
--
hey, nothing lasts forever!
--
I kick, therefore I > #IdleRPG.
I am a founder of ~dAGamers. Have a look and join if you are a gamer!
--
hey, nothing lasts forever!
--
I kick, therefore I > #IdleRPG.
I am a founder of ~dAGamers. Have a look and join if you are a gamer!
--
hey, nothing lasts forever!
--
I believe in Jesus Christ as my Savior. If you do too and aren't scared to admit it then copy and paste this in your signature.
--
I kick, therefore I > #IdleRPG.
I am a founder of ~dAGamers. Have a look and join if you are a gamer!
--
I believe in Jesus Christ as my Savior. If you do too and aren't scared to admit it then copy and paste this in your signature.
Previous PageNext Page