public int GetEra(DateTime time)
{
long ticks = time.Ticks;
// The assumption here is that m_EraInfo is listed in reverse order.
for (int i = 0; i < m_EraInfo.Length; i++) {
if (ticks >= m_EraInfo[i].ticks) {
return (m_EraInfo[i].era);
}
}
throw new ArgumentOutOfRangeException(Environment.GetResourceString("ArgumentOutOfRange_Era"));
}