xtd 0.2.0
date_time_days_in_month.cpp

Shows how to use xtd::date_time::days_in_month method.

#include <xtd/console>
#include <xtd/date_time>
#include <xtd/startup>
class program {
public:
static auto main() {
xtd::console::write_line(days_in_july);
// days_in_feb gets 28 because the year 1998 was not a leap year.
// days_in_feb_leap gets 29 because the year 1996 was a leap year.
xtd::console::write_line(days_in_feb_leap);
}
};
startup_(program::main);
// This code can produces the following output:
//
// 31
// 28
// 29