Login   Register  
PHP Classes
elePHPant
Icontem

File: date_difference_class

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of ashwin suresh morey  >  DateClass  >  date_difference_class  >  Download  
File: date_difference_class
Role: Documentation
Content type: text/plain
Description: document file explaining the class
Class: DateClass
Calculates the difference beween two dates
Author: By
Last change:
Date: 2005-11-09 20:15
Size: 649 bytes
 

Contents

Class file image Download
Class Name:dateDiff
Description:class to calculate the difference between the two dates passed and return the difference in one(seconds, minutes, hours, days) of the formats specified
Constructor: 
dateDiff($firstDate,$secondDate,$interval);
This constructor sets the values of these variables and calls the checkValid function to check the validity of the dates passed to the function.

Methods:
callDiff()
calculates the difference between the two dates and returns the difference in the specified format
Pre-requisite for using the class:
Second date should be greater than the first date
Dates passed to the function should be valid