semestre static method

int semestre(
  1. DateTime data
)

Implementation

static int semestre(DateTime data) => data.month > 6 ? 2 : 1;