Class Time

Description
Variable Summary
int $fractals
int $hours
int $minutes
int $seconds
int $sign
Method Summary
bool Time ([mixed $time = null])
bool Add (mixed $time)
string Diff (mixed $time)
bool Div (mixed $time)
string Get ([mixed $display_sign = null])
int GetAsSeconds ()
void GetColored ([mixed $display_sign = null])
int GetHours ()
int GetMinutes ()
int GetSeconds ()
int GetSign ()
void IsNull ()
bool Mul (mixed $time)
bool Set (mixed $time)
bool SetHours (int $hours)
bool SetMinutes (int $minutes)
bool SetSeconds (int $seconds)
bool SetSign (int $sign)
bool SetTimeFromSeconds (int $seconds)
bool SetTimeFromString (int $time)
bool Sub (mixed $time)
Variables
int $fractals = 0 (line 52)
  • var: Microseconds
  • since: v1.0
  • access: protected
int $hours = 0 (line 31)
  • var: Hours
  • since: v1.0
  • access: protected
int $minutes = 0 (line 38)
  • var: Minutes
  • since: v1.0
  • access: protected
int $seconds = 0 (line 45)
  • var: Seconds
  • since: v1.0
  • access: protected
int $sign = 1 (line 59)
  • var: sign (-1, +1)
  • since: v1.0
  • access: protected
Methods
Constructor Time (line 71)

expects Time in form of seconds as int or in form H:M[:S[.M]] as string or null, if $time is is null then current time is taken

bool Time ([mixed $time = null])
  • mixed $time: Time
Add (line 309)

Adds time

  • return: success
bool Add (mixed $time)
  • mixed $time: Time
Diff (line 351)
  • return: time
string Diff (mixed $time)
  • mixed $time: Time
Div (line 342)
  • return: success
bool Div (mixed $time)
  • mixed $time: Time
Get (line 83)

returns time in form HH:MM

string Get ([mixed $display_sign = null])
GetAsSeconds (line 150)

returns time in seconds

  • return: seconds
  • since: v1.4
int GetAsSeconds ()
GetColored (line 100)
void GetColored ([mixed $display_sign = null])
GetHours (line 118)

returns hours

  • return: hours
  • since: v1.0
int GetHours ()
GetMinutes (line 126)

returns minutes

  • return: minutes
  • since: v1.0
int GetMinutes ()
GetSeconds (line 134)

returns seconds fo time

  • return: seconds
  • since: v1.4
int GetSeconds ()
GetSign (line 142)

returns sign as -1 or +1

  • return: sign
  • since: v1.4
int GetSign ()
IsNull (line 293)
void IsNull ()
Mul (line 333)
  • return: success
bool Mul (mixed $time)
  • mixed $time: Time
Set (line 212)
bool Set (mixed $time)
  • mixed $time: Time
SetHours (line 175)

sets hours, returns true on success, otherwise false

  • return: success
  • since: v1.0
bool SetHours (int $hours)
  • int $hours: hours
SetMinutes (line 188)

sets minutes, returns true on success, otherwise false

  • return: success
  • since: v1.0
bool SetMinutes (int $minutes)
  • int $minutes: minutes
SetSeconds (line 201)

sets seconds, returns true on success, otherwise false

  • return: success
  • since: v1.0
bool SetSeconds (int $seconds)
  • int $seconds: seconds
SetSign (line 162)

sets sign, returns true on success, otherwise false

  • return: success
  • since: v1.0
bool SetSign (int $sign)
  • int $sign: sign
SetTimeFromSeconds (line 235)

sets time from given seconds, returns true on success, otherwise false

  • return: success
  • since: v1.0
bool SetTimeFromSeconds (int $seconds)
  • int $seconds: seconds
SetTimeFromString (line 266)

sets time from string in form HH:MM(:SS) returns true on success, otherwise false

  • return: success
  • since: v1.0
bool SetTimeFromString (int $time)
  • int $time: seconds
Sub (line 321)
bool Sub (mixed $time)
  • mixed $time: Time

Documentation generated on Fri, 26 Sep 2003 15:39:57 +0200 by phpDocumentor 1.2.2