mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-06 22:24:27 +02:00
Updated Examples and Recipes (markdown)
@@ -34,7 +34,6 @@ void to_time_point(const std::tm& t,
|
|||||||
{
|
{
|
||||||
using namespace std::chrono;
|
using namespace std::chrono;
|
||||||
using namespace date;
|
using namespace date;
|
||||||
// Component values (as obtained from an UI form, for example)
|
|
||||||
int y = t.tm_year + 1900;
|
int y = t.tm_year + 1900;
|
||||||
auto ymd = year(y)/(t.tm_mon+1)/t.tm_mday; // Yields a year_month_day type
|
auto ymd = year(y)/(t.tm_mon+1)/t.tm_mday; // Yields a year_month_day type
|
||||||
if (!ymd.ok())
|
if (!ymd.ok())
|
||||||
|
Reference in New Issue
Block a user