std::chrono::year::min

来自cppreference.com
< cpp‎ | chrono‎ | year
 
 
 
 
static constexpr std::chrono::year min() noexcept;
(C++20 起)

返回最小的可能的 year,即 std::chrono::year(-32767)

返回值

std::chrono::year(-32767)

示例

#include <chrono>
#include <iostream>
 
int main()
{
    std::cout << "最小年为: " << (int)std::chrono::year::min() << '\n';
}

输出:

最小年为: -32767