| 105 | } |
| 106 | |
| 107 | inline std::string format(const char *fmt = "%Y-%m-%d") const { |
| 108 | char txt[32]; |
| 109 | struct tm temp = m_tm; |
| 110 | temp.tm_year -= baseYear(); // adjust for fact that system has year rel. to 1900 |
| 111 | size_t res = ::strftime(txt, 31, fmt, &temp); |
| 112 | if (res == 0) { |
| 113 | return std::string(""); |
| 114 | } else { |
| 115 | return std::string(txt); |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | friend inline std::ostream &operator<<(std::ostream & os, const Date d); |
| 120 |
no outgoing calls
no test coverage detected