31 #ifndef GNC_OPTION_DATE_HPP_ 32 #define GNC_OPTION_DATE_HPP_ 64 START_CURRENT_QUARTER,
76 START_ACCOUNTING_PERIOD,
77 END_ACCOUNTING_PERIOD,
80 constexpr
unsigned relative_date_periods =
81 static_cast<unsigned>(RelativeDatePeriod::END_ACCOUNTING_PERIOD) + 2;
83 using RelativeDatePeriodVec = std::vector<RelativeDatePeriod>;
183 #endif //GNC_OPTION_DATE_HPP_ std::ostream & operator<<(std::ostream &, const RelativeDatePeriod)
Add the display string to the provided std::ostream.
RelativeDatePeriod gnc_relative_date_from_storage_string(const char *)
Convert a relative date storage string back to a RelativeDatePeriod value.
const char * gnc_relative_date_display_string(RelativeDatePeriod)
Provide the string representation of a relative date for displaying value to a user.
Date and Time handling routines.
const char * gnc_relative_date_description(RelativeDatePeriod)
Provide the description of a relative date.
time64 gnc_relative_date_to_time64(RelativeDatePeriod)
Convert a RelativeDatePeriod value to a concrete time64 by applying the value to the current time...
bool gnc_relative_date_is_ending(RelativeDatePeriod)
Report whether the relative date represents the end of a date range.
bool gnc_relative_date_is_single(RelativeDatePeriod)
Report whether the relative date represents a period offset to today's date rather than the beginning...
RelativeDatePeriod
Reporting periods relative to the current date.
bool gnc_relative_date_is_starting(RelativeDatePeriod)
Report whether the relative date represents the beginning of a date range.
const char * gnc_relative_date_storage_string(RelativeDatePeriod)
Provide the string representation of a relative date for persisting the value.
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...