Shows how to use xtd::date_time::max_value field.
#include <xtd/console>
#include <xtd/date_time>
#include <xtd/int64_object>
#include <xtd/startup>
 
 
class program {
public:
  static auto main() {
    
    auto number_of_ticks = int64_object::max_value;
    
    
    if (number_of_ticks >= date_time::min_value.
ticks() && number_of_ticks <= date_time::max_value.
ticks()) {
 
      console::write_line("{0} is valid.", valid_date.ticks());
    } 
else if (number_of_ticks < date_time::min_value.
ticks())
 
      console::write_line(
"{0} is less than {1} ticks.", number_of_ticks, date_time::min_value.
ticks());
 
    else
      console::write_line(
"{0} is greater than {1} ticks.", number_of_ticks, date_time::max_value.
ticks());
 
  }
};
 
 
Represents an instant in time, typically expressed as a date and time of day.
Definition date_time.hpp:85
 
#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:175
 
std::chrono::duration< int64, tick > ticks
Represents a tick duration.
Definition ticks.hpp:21
 
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10