|
Hegel 0.18.3
Property-based testing for C++
|
A calendar span: a signed count of each unit from years to nanoseconds, never normalised (90 minutes is not an hour and a half, and a month is not a number of days). More...
#include <temporal_types.h>
Public Member Functions | |
| int64_t | get (SpanUnit unit) const |
A calendar span: a signed count of each unit from years to nanoseconds, never normalised (90 minutes is not an hour and a half, and a month is not a number of days).
Every unit shares one sign unless the span was drawn with SpanSign::Mixed. Prints each nonzero unit in the friendly form 1y 2mo 3w 4d 5h 6m 7s 8ms 9µs 10ns, and 0s for zero. A span with no positive unit has one leading - for all its units (-3d 4h is -3 days and -4 hours), and a span with units of both signs has a sign on each unit (-3d +4h).
| int64_t hegel::generators::temporal::Span::get | ( | SpanUnit | unit | ) | const |
The count of one unit in this span.
| unit | The unit to read. |