Shows how to use xtd::date_time::date_time_day_of_year property.
#include <xtd/xtd>
class program {
public:
static auto main() {
auto dec31 = date_time {2010, 12, 31};
for (auto ctr = 0u; ctr <= 10u; ctr++) {
auto date_to_display = dec31.add_years(ctr);
console::write_line("{0:d}: day {1} of {2} {3}", date_to_display, date_to_display.day_of_year(), date_to_display.year(), date_time::is_leap_year(date_to_display.year()) ? "(Leap Year)" : "");
}
}
};
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.hpp:168