xtd 0.2.0
Loading...
Searching...
No Matches
date_time_min_value.cpp

Shows how to use xtd::date_time::min_value field.

#include <xtd/console>
#include <xtd/date_time>
#include <xtd/startup>
using namespace xtd;
class program {
public:
static auto main() {
// Define an uninitialized date.
auto date1 = date_time {};
console::write("{:u}", date1);
if (date1.equals(date_time::min_value))
console::write_line(" (Equals date_time.min_value)");
}
};
startup_(program::main);
// This code can produces the following output:
//
// 01/01/0001 00:00:00 (Equals date_time.min_value)
Represents an instant in time, typically expressed as a date and time of day.
Definition date_time.h:79
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.h:166
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10