## DateTimeFormatInfo::GetEra method


按名称获取纪元。

```cpp
int System::Globalization::DateTimeFormatInfo::GetEra(const String &era_name) const
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| era_name | const String\& | 纪元名称。 |

### ReturnValue

纪元索引。

## 另见

* Class [String](../../../system/string/)
* Class [DateTimeFormatInfo](../)
* Namespace [System::Globalization](../../)
* Library [Aspose.Font for C++](../../../)
