private static bool SetDateYMD(ref DateTimeResult result, int year, int month, int day)
{
// Note, longer term these checks should be done at the end of the parse. This current
// way of checking creates order dependence with parsing the era name.
if (result.calendar.IsValidDay(year, month, day, result.era))
{
result.SetDate(year, month, day); // YMD
return (true);
}
return (false);
}