Zend - The PHP Company




Date & Time

Add Code


Basic clock  

Type: application
Added by: joikulp
Entered: 02/02/2004
Last modified: 02/12/2003
Rating: *** (5 votes)
Views: 8274
Clock that refresh every 1 sec.


birthday  

Type: code fragment
Added by: boanerges
Entered: 18/12/2003
Last modified: 01/11/2008
Rating: - (fewer than 3 votes)
Views: 5389
Give it your birthday and it gives you the day of the week you were born...


Bs_StopWatch  

Type: class
Added by: blueshoes
Entered: 09/11/2002
Last modified: 01/11/2001
Rating: - (fewer than 3 votes)
Views: 5070
class to measure time intervals in microseconds. You can take times during a code run and at the end get a time table as HTML or text table. The output will contain total and as delta between each take in microseconds.


Calculate unique Visits (Website Visits)  

Type: code fragment
Added by: cyberskater
Entered: 08/12/2005
Last modified: 02/12/2005
Rating: - (fewer than 3 votes)
Views: 3571
The offical definition of a website visit in web-marketing is e.g. "user has not clicked on a website for more then 10 minutes".


Calender  

Type: application
Added by: vardhan
Entered: 15/01/2005
Last modified: 08/12/2008
Rating: - (fewer than 3 votes)
Views: 5894
A Calender that updates itself.. Might come in handy if you're making a blog or a "Archives Posted this month" or something


DateSelector  

Type: code fragment
Added by: leon
Entered: 30/04/2000
Last modified: 08/12/1999
Rating: **** (12 votes)
Views: 17095
DateSelector creates three SELECT form fields for month, day, and year. The current day is selected unless a date is supplied as the second argument.


datetime object for date and time manipulation  

Type: class
Added by: phkemper
Entered: 15/08/2006
Last modified: 09/12/2005
Rating: - (fewer than 3 votes)
Views: 3533
Works with date and time, supports fiscal dates and can convert from a myriad of string formats to various system formats. Also does date and time differences.


date_in_interval()  

Type: code fragment
Added by: darkelder
Entered: 30/05/2002
Last modified: 06/12/2001
Rating: - (fewer than 3 votes)
Views: 6187
Check if the time is in some intervals.


Dealing with microtime  

Type: code fragment
Added by: mgkimsal
Entered: 12/05/2000
Last modified: 08/12/1999
Rating: **** (8 votes)
Views: 7173
This is a quick function I wrote to parse out the 'microtime()' feature, and deal with the results mathmatically. Since microtime() returns the milliseconds, then a space, then the unix timestamp, using the results from microtime() itself weren't conducive to quick math. We had some pages here that we needed to time down to the millisecond, so we used this. :)


Finding upcoming holidays  

Type: code fragment
Added by: heymeadows
Entered: 01/06/2001
Last modified: 06/12/2000
Rating: - (fewer than 3 votes)
Views: 6884
These functions allow you to define a calendar of holidays and find which one comes up next. Holidays can be defined as fixed, or floating (eg. 3d sunday of june.)


Friendly Date Range  

Type: code fragment
Added by: wilton
Entered: 18/05/2003
Last modified: 09/12/2002
Rating: - (fewer than 3 votes)
Views: 5240
Give this function two dates, of format YYYY-MM-DD and it will print a friendly intelligent string. ie it only print date elements that are different between the two dates.


Joe Harman's Calendar  

Type: application
Added by: cjharman
Entered: 04/01/2005
Last modified: 01/12/2004
Rating: - (fewer than 3 votes)
Views: 4693
Web based calendar. The calendar has 2 functions. The first is to view the whole month, the second is used when you click on a specific day in the month, which will then take you to the hour breakout for that day and the previous and next day


jTimer  

Type: application
Added by: redhatmatser
Entered: 30/11/2000
Last modified: 01/12/2000
Rating: - (fewer than 3 votes)
Views: 7127
jTimer will give you a way to setup a timer in your php script


microtime timer class  

Type: class
Added by: charles_killian
Entered: 28/06/2000
Last modified: 08/12/1999
Rating: ***** (6 votes)
Views: 7575
Time your PHP scripts. I took the "dealing with microtime" function and created a class. Now it is easy to start, stop and print out the elapsed time. Great for timing PHP scripts.


nextmonth  

Type: code fragment
Added by: rktaxali
Entered: 30/01/2006
Last modified: 02/12/2005
Rating: - (fewer than 3 votes)
Views: 3366
nextmonth() returns a time number corresponding to the date one month from the passed time. It is different from strtotime("next month"). Function takes care of the leap year. E.g. for Jan 31, 2000, strtotime("next month") returns 2000-03-02 whereas nextmonth() returns 2000-02-29


Number of Work Days between Dates  

Type: code fragment
Added by: gmrcomp
Entered: 29/07/2004
Last modified: 08/12/2003
Rating: - (fewer than 3 votes)
Views: 7536
This function returns the number of work days between two dates.


PHP Clock  

Type: code fragment
Added by: prochazka
Entered: 24/11/2000
Last modified: 01/12/2000
Rating: - (fewer than 3 votes)
Views: 18592
View round clock in GIF format.


PHP_Scheduler  

Type: class
Added by: ryanflynn
Entered: 25/06/2001
Last modified: 06/12/2000
Rating: - (fewer than 3 votes)
Views: 7026
PHP_Scheduler is a very simple class for storing timestamps at application-level. It can be useful in situations such as "I want to update a file not more than once every 15 minutes" or "I want to cache a database query and refresh it every 30 minutes." The class is very simple to use, simply look at the example. Feel free to contact me via email with questions/suggestions/bug reports.


precise timer class  

Type: application
Added by: skyrl
Entered: 14/11/2001
Last modified: 01/11/2000
Rating: - (fewer than 3 votes)
Views: 5886
This class allow very precise timing based on microtime() function, in a two-step very simple operation: Call it from your code with include("timer.class.php4"), Then start and stop timer before and after your code.


Smarty Enabled Calendar  

Type: application
Added by: bmickler
Entered: 01/09/2006
Last modified: 31/10/2005
Rating: - (fewer than 3 votes)
Views: 5359
Small calendar that displays the days, month, and abbrev. year. Allows the user to move forward and backward one month or one year, and quickly return to today's view.


Stopwatch class for checking PHP performance  

Type: class
Added by: hughprior
Entered: 16/04/2002
Last modified: 04/12/2001
Rating: - (fewer than 3 votes)
Views: 6395
This simple class gives stopwatch style functionality, including split times, to enable the timing of functions. It's easy to understand and use (I think!), but you could easily expand it.


Time-Based Contest  

Type: application
Added by: RLYNCH
Entered: 27/01/2000
Last modified: 08/12/1999
Rating: - (fewer than 3 votes)
Views: 7474
Run a contest that ends at a specific date/time


timespan()  

Type: code fragment
Added by: stephenv
Entered: 24/10/2001
Last modified: 02/11/2000
Rating: **** (3 votes)
Views: 6942
timespan - creates an associative array based on starttime and endtime. Accepts ISO time format (YYYY-MM-DD HH:MM:SS) or pure seconds.


valid date  

Type: code fragment
Added by: idban
Entered: 23/08/2001
Last modified: 08/12/2000
Rating: - (fewer than 3 votes)
Views: 8040
checkin' valid date



Search



This Category All Categories