libtime++: Date and time calculation

◆ hierarchicalstring()

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

Definition at line 43 of file hierarchicaltimestring.cc.

References day(), libtime::TBaseClassTime::hour(), libtime::TBaseClassTime::micsec(), libtime::TBaseClassTime::milsec(), libtime::TBaseClassTime::minute(), month(), libtime::TBaseClassTime::second(), and year().

Referenced by main().

44 {
45  std::ostringstream oss;
46  oss.width(4);
47  oss.fill('0');
48  oss << this->year() << "/";
49  oss.width(2);
50  oss.fill('0');
51  oss << this->month() << "/";
52  oss.width(2);
53  oss.fill('0');
54  oss << this->day() << "-";
55  oss.width(2);
56  oss.fill('0');
57  oss << this->hour() << ":";
58  oss.width(2);
59  oss.fill('0');
60  oss << this->minute() << ":";
61  oss.width(2);
62  oss.fill('0');
63  oss << this->second() << ".";
64  oss.width(3);
65  oss.fill('0');
66  oss << this->milsec();
67  oss.width(3);
68  oss.fill('0');
69  oss << this->micsec();
70  return(oss.str());
71 }
timeint year() const
Definition: libtime++.h:337
timeint month() const
Definition: libtime++.h:339
timeint day() const
Definition: libtime++.h:341
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: