src/Date.cpp
/*!
    Returns the date as a wide string. The \a format parameter determines
    the format of the result string.

    These expressions can refer to std::strftime.
    see https://en.cppreference.com/w/cpp/chrono/c/wcsftime

    \note The result is 1024 character limits.
*/
Returns the date as a wide string. The \a format parameter determines
the format of the result string.

These expressions can refer to std::strftime.

\note The result is 1024 character limits.
Returns the date as a wide string . The \ a format parameter determines the format of the result string . These expressions can refer to std :: strftime . \ note The result is 1024 character limits .
std::wstring Date::toWString(const wchar_t* format)
{
    std::size_t buff_size = 1024;
    std::wstring result;
    result.resize(buff_size);
    std::tm tm{ 0 };
    tm.tm_year = m_dt.year - 1900;
    tm.tm_mon = m_dt.mon - 1;
    tm.tm_mday = m_dt.mday;
    std::wcsftime(&result.front(), buff_size, format, &tm);
    return result;
}
std :: wstring Date :: toWString ( const wchar_t * format ) { std :: size_t buff_size = 1024 ; std :: wstring result ; result . resize ( buff_size ) ; std :: tm tm { 0 } ; tm . tm_year = m_dt . year - 1900 ; tm . tm_mon = m_dt . mon - 1 ; tm . tm_mday = m_dt . mday ; std :: wcsftime ( & result . front ( ) , buff_size , format , & tm ) ; return result ; }
Returns the date as a wide string.
Returns the date as a wide string .