The OpenD Programming Language

YearMonth.opCast

import mir.date;
struct YearMonth
alias opCast(T : Timestamp) = timestamp

Examples

import mir.timestamp;
auto ym0 = YearMonth(2020, Month.may);
auto timestamp1 = cast(Timestamp) ym0;
auto ym1 = YearMonth(timestamp1);

Meta