friend nana::listbox::oresolver& operator<<(nana::listbox::oresolver& ores, const item_fs& item) { std::wstringstream tm; tm << (item.modified_time.tm_year + 1900) << '-' ; _m_add(tm, item.modified_time.tm_mon + 1) << '-' ; _m_add(tm, item.modified_time.tm_mday ) << ' ' ; _m_add(tm, item.modified_time.tm_hour ) << ':' ; _m_add(tm, item.modified_time.tm_min ) << ':' ; _m_add(tm, item.modified_time.tm_sec ) ; ores<<item.name<<tm.str(); if(!item.directory) { auto pos = item.name.find_last_of(STR('.')); if(pos != item.name.npos && (pos + 1 < item.name.size())) ores<<item.name.substr(pos + 1); else ores<<STR("File"); ores<<_m_trans(item.bytes); } else ores<<STR("Directory"); return ores; }
date date::operator + (int off) const { if(off < 0) return _m_sub(static_cast<unsigned>(-off)); return _m_add(static_cast<unsigned>(off)); }