# std::time_base

> C++ Atlas: `cppatlas.com/w/cpp/locale/time_base` | Source: https://en.cppreference.com/w/cpp/locale/time_base | Domain: Localization

The class std::time_base provides the date order constants which are inherited by the std::time_get facets.

## Official Specification Summary (cppreference)

```cpp
// Defined in header <locale>
class time_base;
```

The class `std::time_base` provides the date order constants which are inherited by the `std::time_get` facets.

### Member types

**Member type — Definition**

- `enum dateorder { no_order, dmy, mdy, ymd, ydm };`: Unscoped enumeration type

**Enumeration constant — Definition**

- `no_order`: Unspecified order
- `dmy`: Day, month, year (european) order
- `mdy`: Month, day, year (american) order
- `ymd`: Year, month, day (asian) order
- `ydm`: Year, day, month

### See also

- [`do_date_order`](https://en.cppreference.com/w/cpp/locale/time_get/date_order) [virtual]: obtains preferred ordering of day, month, and year (virtual protected member function of `std::time_get<CharT,InputIt>`)
- [`do_get_date`](https://en.cppreference.com/w/cpp/locale/time_get/get_date) [virtual]: extracts month, day, and year from input stream (virtual protected member function of `std::time_get<CharT,InputIt>`)

---
Attribution: content from https://en.cppreference.com/w/cpp/locale/time_base (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.