Skip to main content

imm_code_of

Function imm_code_of 

pub fn imm_code_of(date: NaiveDate) -> Option<String>
Expand description

The IMM code ("JUN27") naming date, the inverse of imm_code_to_dates’s reference-period start.

None where date is not the third Wednesday of its month, or where its year is outside the 2000–2099 window a two-digit code can spell — the same window imm_code_to_dates resolves in, so the two are inverse over exactly the codes that exist.

The code names a month, and a month is a monthly-cycle IMM date; a caller wanting the quarterly restriction asks is_imm_date with ImmCycle::Imm3M as well.