Advertisement
Serafim

Untitled

Feb 11th, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. class TimeInterval
  2. {
  3.   public function __construct($seconds){ *** }
  4.  
  5.   public static function createFromDate($hours = 0, $minutes = 0, $seconds = 0)
  6.   {
  7.     return new self($hours * 60 * 60 + $minutes * 60 + $seconds);
  8.   }
  9.  
  10.   public function addSeconds($count){ ***** += $count; }
  11.   public function addMinutes($count){ ***** += $count * 60; }
  12.   public function addHours($count){ ***** += $count * 60 * 60; }
  13.  
  14.   public function getSeconds(){ *** }
  15.   public function getMinutes(){ *** }
  16.   public function getHours(){ *** }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement