libtime++: Date and time calculation

◆ hierarchicalstring()

std::string libtime::TRelativeTime::hierarchicalstring ( ) const

Definition at line 73 of file hierarchicaltimestring.cc.

References days(), libtime::TBaseClassTime::hour(), libtime::TBaseClassTime::micsec(), libtime::TBaseClassTime::milsec(), libtime::TBaseClassTime::minute(), and libtime::TBaseClassTime::second().

Referenced by main().

74 {
75  std::ostringstream oss;
76  oss << this->days() << "-";
77  oss.width(2);
78  oss.fill('0');
79  oss << this->hour() << ":";
80  oss.width(2);
81  oss.fill('0');
82  oss << this->minute() << ":";
83  oss.width(2);
84  oss.fill('0');
85  oss << this->second() << ".";
86  oss.width(3);
87  oss.fill('0');
88  oss << this->milsec();
89  oss.width(3);
90  oss.fill('0');
91  oss << this->micsec();
92  return(oss.str());
93 }
timeint days() const
Definition: libtime++.h:408
timeint milsec() const
Definition: libtime++.h:293
timeint micsec() const
Definition: libtime++.h:294
timeint hour() const
Definition: libtime++.h:290
timeint second() const
Definition: libtime++.h:292
timeint minute() const
Definition: libtime++.h:291
Here is the call graph for this function:
Here is the caller graph for this function: