Changeset 13954 for trunk/FACT++
- Timestamp:
- 05/28/12 23:50:20 (13 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Time.cc
r13777 r13954 268 268 } 269 269 270 string Time::MinutesTo(const Time &time) const 271 { 272 ostringstream str; 273 if (time>*this) 274 str << time-*this; 275 else 276 str << *this-time; 277 return str.str().substr(0, 5); 278 } 279 280 string Time::SecondsTo(const Time &time) const 281 { 282 ostringstream str; 283 if (time>*this) 284 str << time-*this; 285 else 286 str << *this-time; 287 return str.str().substr(str.str().substr(0, 3)=="00:" ? 3 : 0, 5); 288 } 289 270 290 // -------------------------------------------------------------------------- 271 291 // -
trunk/FACT++/src/Time.h
r13777 r13954 103 103 uint64_t JavaDate() const { return uint64_t(UnixTime()*1000); } 104 104 105 std::string MinutesTo(const Time & = Time()) const; 106 std::string SecondsTo(const Time & = Time()) const; 107 105 108 int NightAsInt() const; 106 109 };
Note:
See TracChangeset
for help on using the changeset viewer.