Tag Archives: date

Get current and past month with Zend Date

Description: Return current and previous months in Zend Framework, considering passing into a new year as well. Solution: Zend Framework, through Zend_Date() offers a quick solution for this problem. With the get() function we can return any part of the current date, and with … Continue reading

Posted in PhP, Tools, Zend Framework | Tagged , | 1 Comment

Recreate date and time from a timestamp in PHP

Description: Reconstruct readable date and time from an integer timestamp. Solution: We have to use the date() function of PHP. The function takes a string containing the structure of the desired outputted date and the timestamp which we will use: … Continue reading

Posted in PhP | Tagged , , | Leave a comment

Get time difference in PHP with microtime()

Description: Detect how long a script, query or function takes to run in php. Solution: PHP offers the microtime() function, which returns the number of microseconds (a millionth of a second) that passed since 1st of January 1970, the PHP … Continue reading

Posted in PhP | Tagged , , , | 3 Comments