(* [date d m] check if [d] is a valid date in [m]*)
let date d m =
  match m with
  | "Feb" -> d >= 1 && d <= 29
  | "Apr" | "Jun" | "Sep" | "Nov" -> d >= 1 && d <= 30
  | "Jan" | "Mar" | "May" | "Jul" | "Aug" | "Oct" | "Dec" -> d >= 1 &&  d <= 31
  | _ -> false