. Updated Daily. Editions SDA India   SDA Indonesia
JAX Asia 2008 - Conference for Enterprise Java, SOA, Spring, Web Services, Ajax, Agile and more
BUSINESS ENTERPRISE SOLUTIONS ARCHITECTURE INFORMATION SECURITY WIRELESS & MOBILITY DATA & STORAGE DEVELOPMENT HARDWARE













News

Monday, 23 April 2007

Easy time_since Function in PHP

 

 

The Photogapple.co.uk blog has code that can be useful when working with dates in PHP. The author, Carbon Twelve has given a function to find the difference between the current time and a timestamp provided by you.

He says, it is difficult to find any form of time_since function in PHP. So to save anyone else the trouble of hunting through hundreds of useless web sites he gives this function. Carbon tells you that this function takes the input in the form of the Unix time stamp.

He provides a second compact version. He takes the input in the form of the MySQL timestamp format (Y-m-d H:i:s). However, he shows that both functions output the same type of things, so the decision to choose the respective function is entirely on you.

 

Read the Post

 
 
print save email comment

print

save

email

comment

 
 

Search SDA Asia

Free eNewsletter

SDA Asia Magazine Free Download
 
 
 
Copyright @ 2008 SDA Asia Magazine - All Right Reserved Privacy Policy | Terms of Use