|
ORE Studio 0.0.4
|
Generates fake datetime values for testing purposes. More...
#include <datetime.hpp>

Static Public Member Functions | |
| static std::chrono::system_clock::time_point | past_timepoint () |
| Generates a random past datetime as a time_point. | |
| static std::string | past_string () |
| Generates a random past datetime as a formatted string. | |
| static std::chrono::system_clock::time_point | make_timepoint (int year, int month, int day, int hour=0, int min=0, int sec=0) |
| Creates a time_point from date/time components. | |
Generates fake datetime values for testing purposes.
|
static |
Generates a random past datetime as a time_point.
Returns a random datetime between 1970-01-01 and 2038-12-31.

|
static |
Generates a random past datetime as a formatted string.
Returns a string in the format "YYYY-MM-DD HH:MM:SS".

|
static |
Creates a time_point from date/time components.
Uses C++20's timezone-agnostic sys_days for deterministic results across different environments.
| year | The year (e.g., 2025) |
| month | The month (1-12) |
| day | The day (1-31) |
| hour | The hour (0-23, default 0) |
| min | The minute (0-59, default 0) |
| sec | The second (0-59, default 0) |