#include <xtd/console>
#include <xtd/date_time>
#include <xtd/startup>
class program {
public:
static auto main() {
auto format = "{0}) The {1} date and time is {2:k}/{2:i}/{2:L} {2:t}";
console::write_line(format, 1, "maximum", dt1);
console::write_line(format, 2, "minimum", dt2);
console::write_line(format, 3, "custom ", dt3);
console::write_line(
"\nThe custom date and time is created from {0} ticks.",
ticks);
}
};
Represents an instant in time, typically expressed as a date and time of day.
Definition date_time.h:85
int64 ticks() const noexcept
Gets the number of ticks that represent the date and time of this instance.
#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:175
std::chrono::duration< int64, tick > ticks
Represents a tick duration.
Definition ticks.h:21
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10