PHP Classes
elePHPant
Icontem

datetime difference: calculate datetime difference

Recommend this page to a friend!
  All requests RSS feed  >  datetime difference  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

datetime difference

Edit

by Anant kumar singh - 4 years ago (2015-04-14)

calculate datetime difference

This request is clear and relevant.
This request is not clear or is not relevant.

+1

how to find two date difference . means the product post houre

Ask clarification

2 Recommendations

Very precise date difference: Calculate the days between dates within any years

This recommendation solves the problem.
This recommendation does not solve the problem.

0

by zinsou A.A.E.Mo´se package author package author Reputation 5545 - 2 years ago (2017-07-20) Comment

compute-the-precise-number-of-days-between-two-dates

  • 1 Comment
  • 1. by zinsou A.A.E.Mo´se package author package author - 2 years ago (2017-08-02) Reply

    AS i dig a little more,i find a way based on the same algorithm to compute time difference too.So i provide this other package for datetime difference : Package number https://www.phpclasses.org/package/10412-PHP-compute-the-exact-duration-within-two-dates.html(not yet approved but it will) this package provide a method to return the duration in the format that you have chosen in this set with a parameter to keep null value or not:

    							case "m": float number milleniums
    							case "c": float number  centuries 					
    		 					case "y": float number years
    								
    							case "d": float number days
    								
    							case "h": float number hours
    								
    							case "i": float number minutes
    								
    							case "mc": string((int)millenium and (float) century)
    								
    							case "mcydhis": string(millenium centuries years days hours minutes and seconds)
    								
    							case "cydhis":	string( centuries years days hours minutes and seconds)
    								
    							case "ydhis":	string(years days hours minutes and seconds)
    								
    							case "dhis":	string(days hours minutes and seconds)
    								
    							case "his":	string( hours minutes and seconds)
    								
    							case "is":	string( minutes and seconds)
    								
    							case "s":	seconds
    								
    							default: in seconds
    								;
    


PHP Date Math Class: Perform operations with dates with long year range

This recommendation solves the problem.
This recommendation does not solve the problem.

+1

by Bob Wedwick package author package author Reputation 30 - 4 years ago (2015-05-13) Comment

This class computes differences between two dates in days, seeks, months, or years but not in hours, minutes, seconds. When times are used, they may affect the computation by plus or minus one. Time may be formatted as AM/PM or 24-hour time. Dates can have several different formats.


Recommend package
: 
: