Function Epoch.tryFromDecimalYear
Construct a finite decimal-year epoch without throwing.
Parameters
| Name | Description |
|---|---|
| value | Finite decimal year. |
| result | Receives the epoch on success. |
Returns
true for finite input; otherwise false. On entry result
is reset to invalid .
Example
Example checking decimal-year construction without throwing.
import geodesy;
Epoch!double epoch;
assert(Epoch!double .tryFromDecimalYear(2010.0, epoch));
assert(epoch .decimalYear == 2010.0);