STD::TIME_GET_BYNAME(3cxx)
π std::time_get_byname< _CharT, _InIter > β 3cxx manual page π
okay bestie, this is the std::time_get_byname< _CharT, _InIter > page from section 3cxx β and we folded the manual name up here instead of copy-pasting that header line twice. slay. π
π NAME π
std::time_get_byname< _CharT, _InIter > β literally class time_get_byname [22.2.5.2]. that's the whole name section, no cap. π«Ά
β¨ SYNOPSIS β¨
#include <locale>
Inherits std::time_get< _CharT, _InIter >. yes bestie, it's giving inheritance. π
πΈ Public Types πΈ
typedef _CharT char_typeβ the character type, iconic.enum dateorder { no_order, dmy, mdy, ymd, ydm }β the enum for date ordering, exactly those values, periodt.typedef _InIter iter_typeβ the iterator type, main character energy.
π¦ Public Member Functions π¦
time_get_byname (const char *, size_t __refs=0)β constructor takingconst char *andsize_t __refs=0.time_get_byname (const string &__s, size_t __refs=0)β constructor takingconst string &__sandsize_t __refs=0.dateorder date_order () constβ Return preferred order of month, day, and year.iter_type get (iter_type __s, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm, char __format, char __modifier=0) constβ Parse input string according to format.iter_type get (iter_type __s, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm, const char_type *__fmt, const char_type *__fmtend) constβ Parse input string according to format.iter_type get_date (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) constβ Parse input date string.iter_type get_monthname (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) constβ Parse input month string.iter_type get_time (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) constβ Parse input time string.iter_type get_weekday (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) constβ Parse input weekday string.iter_type get_year (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) constβ Parse input year string.
π Static Public Attributes π
static locale::id idβ Numpunct facet id. yes, the page literally saysNumpunct facet id.and we are keeping it exactly, no edits. π«Ά
π Protected Member Functions π
_M_extract_nameβ exact signature:
iter_type _M_extract_name (iter_type __beg, iter_type __end, int
&__member, const _CharT **__names, size_t __indexlen, ios_base
&__io, ios_base::iostate &__err) const
_M_extract_numβ exact signature:
iter_type _M_extract_num (iter_type __beg, iter_type __end, int
&__member, int __min, int __max, size_t __len, ios_base &__io,
ios_base::iostate &__err) const
_M_extract_via_formatβ exact signature:
iter_type _M_extract_via_format (iter_type __beg, iter_type __end,
ios_base &__io, ios_base::iostate &__err, tm *__tm, const _CharT
*__format) const
_M_extract_via_formatβ exact signature with__time_get_state:
iter_type _M_extract_via_format (iter_type __beg, iter_type __end,
ios_base &__io, ios_base::iostate &__err, tm *__tm, const _CharT
*__format, __time_get_state &__state) const
_M_extract_wday_or_monthβ exact signature:
iter_type _M_extract_wday_or_month (iter_type __beg, iter_type __end,
int &__member, const _CharT **__names, size_t __indexlen, ios_base
&__io, ios_base::iostate &__err) const
virtual dateorder do_date_order () constβ Return preferred order of month, day, and year.do_getβ Parse input string according to format. exact signature:
iter_type do_get (iter_type __s, iter_type __end, ios_base &__f,
ios_base::iostate &__err, tm *__tm, char __format, char __modifier)
const
virtual iter_type do_get_date (...) constβ Parse input date string. exact signature:
virtual iter_type do_get_date (iter_type __beg, iter_type __end,
ios_base &__io, ios_base::iostate &__err, tm *__tm) const
virtual iter_type do_get_monthname (...) constβ Parse input month string. exact signature:
virtual iter_type do_get_monthname (iter_type __beg, iter_type __end,
ios_base &, ios_base::iostate &__err, tm *__tm) const
virtual iter_type do_get_time (...) constβ Parse input time string. exact signature:
virtual iter_type do_get_time (iter_type __beg, iter_type __end,
ios_base &__io, ios_base::iostate &__err, tm *__tm) const
virtual iter_type do_get_weekday (...) constβ Parse input weekday string. exact signature:
virtual iter_type do_get_weekday (iter_type __beg, iter_type __end,
ios_base &, ios_base::iostate &__err, tm *__tm) const
virtual iter_type do_get_year (...) constβ Parse input year string. exact signature:
virtual iter_type do_get_year (iter_type __beg, iter_type __end,
ios_base &__io, ios_base::iostate &__err, tm *__tm) const
π§ Static Protected Member Functions π§
static __c_locale _S_clone_c_locale (__c_locale &__cloc) throw ()static void _S_create_c_locale (__c_locale &__cloc, const char *__s, __c_locale __old=0)static void _S_destroy_c_locale (__c_locale &__cloc)static __c_locale _S_get_c_locale ()static const char * _S_get_c_name () throw ()static __c_locale _S_lc_ctype_c_locale (__c_locale __cloc, const char *__s)
π Detailed Description π
template<typename _CharT, typename _InIter>
class std::time_get_byname< _CharT, _InIter >"class time_get_byname
[22.2.5.2].
that's the detailed description, bestie β minimal but iconic. π
π₯ Member Function Documentation π₯
π date_order π
template<typename _CharT , typename _InIter >
dateorder std::time_get< _CharT, _InIter >::date_order () const
tagged [inline], [inherited]. π
Return preferred order of month, day, and year. This function returns an enum from time_base::dateorder giving the preferred ordering if the format x given to time_put::put() only uses month, day, and year. If the format x for the associated locale uses other fields, this function returns time_base::dateorder::noorder.
NOTE: The library always returns noorder at the moment. π
Returns: A member of time_base::dateorder.
References: std::time_get< _CharT, _InIter >::do_date_order().
π do_date_order π
template<typename _CharT , typename _InIter >
_GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 time_base::dateorder std::time_get<
_CharT, _InIter >::do_date_order () const
tagged [protected], [virtual], [inherited]. π¦
Return preferred order of month, day, and year. This function returns an enum from time_base::dateorder giving the preferred ordering if the format x given to time_put::put() only uses month, day, and year. This function is a hook for derived classes to change the value returned.
Returns: A member of time_base::dateorder.
Referenced by: std::time_get< _CharT, _InIter >::date_order().
π do_get π
template<typename _CharT , typename _InIter > _InIter std::time_get< _CharT,
_InIter >::do_get (iter_type __s, iter_type __end, ios_base & __f,
ios_base::iostate & __err, tm * __tm, char __format, char __modifier)
const
tagged [inline], [protected], [inherited]. β¨
Parse input string according to format. This function parses the string according to the provided format and optional modifier. This function is a hook for derived classes to change the value returned.
See also: get() for more details.
Parameters:
__sβ Start of string to parse.__endβ End of string to parse.__fβ Source of the locale.__errβ Error flags to set.__tmβ Pointer to struct tm to fill in.__formatβ Format specifier.__modifierβ Format modifier.
Returns: Iterator to first char not parsed.
References: std::ios_base::_M_getloc(), std::ios_base::eofbit, std::ios_base::goodbit, and std::__ctype_abstract_base< _CharT >::widen().
Referenced by: std::time_get< _CharT, _InIter >::get(), and std::time_get< _CharT, _InIter >::get().
π do_get_date π
template<typename _CharT , typename _InIter > _InIter std::time_get< _CharT,
_InIter >::do_get_date (iter_type __beg, iter_type __end, ios_base &
__io, ios_base::iostate & __err, tm * __tm) const
tagged [protected], [virtual], [inherited]. π
Parse input date string. This function parses a date according to the format X and puts the results into a user-supplied struct tm. This function is a hook for derived classes to change the value returned.
See also: get_date() for details.
Parameters:
__begβ Start of string to parse.__endβ End of string to parse.__ioβ Source of the locale.__errβ Error flags to set.__tmβ Pointer to struct tm to fill in.
Returns: Iterator to first char beyond date string.
References: std::ios_base::_M_getloc(), and std::ios_base::eofbit.
Referenced by: std::time_get< _CharT, _InIter >::get_date().
π do_get_monthname π
template<typename _CharT , typename _InIter > _InIter std::time_get< _CharT,
_InIter >::do_get_monthname (iter_type __beg, iter_type __end, ios_base
& __io, ios_base::iostate & __err, tm * __tm) const
tagged [protected], [virtual], [inherited]. πΈ
Parse input month string. This function parses a month name and puts the results into a user-supplied struct tm. This function is a hook for derived classes to change the value returned.
See also: get_monthname() for details.
Parameters:
__begβ Start of string to parse.__endβ End of string to parse.__ioβ Source of the locale.__errβ Error flags to set.__tmβ Pointer to struct tm to fill in.
Returns: Iterator to first char beyond month name.
References: std::ios_base::_M_getloc(), std::ios_base::eofbit, std::ios_base::failbit, and std::ios_base::goodbit.
Referenced by: std::time_get< _CharT, _InIter >::get_monthname().
π do_get_time π
template<typename _CharT , typename _InIter > _InIter std::time_get< _CharT,
_InIter >::do_get_time (iter_type __beg, iter_type __end, ios_base &
__io, ios_base::iostate & __err, tm * __tm) const
tagged [protected], [virtual], [inherited]. π°οΈ
Parse input time string. This function parses a time according to the format x and puts the results into a user-supplied struct tm. This function is a hook for derived classes to change the value returned.
See also: get_time() for details.
Parameters:
__begβ Start of string to parse.__endβ End of string to parse.__ioβ Source of the locale.__errβ Error flags to set.__tmβ Pointer to struct tm to fill in.
Returns: Iterator to first char beyond time string.
References: std::ios_base::_M_getloc(), and std::ios_base::eofbit.
Referenced by: std::time_get< _CharT, _InIter >::get_time().
π do_get_weekday π
template<typename _CharT , typename _InIter > _InIter std::time_get< _CharT,
_InIter >::do_get_weekday (iter_type __beg, iter_type __end, ios_base &
__io, ios_base::iostate & __err, tm * __tm) const
tagged [protected], [virtual], [inherited]. π
Parse input weekday string. This function parses a weekday name and puts the results into a user-supplied struct tm. This function is a hook for derived classes to change the value returned.
See also: get_weekday() for details.
Parameters:
__begβ Start of string to parse.__endβ End of string to parse.__ioβ Source of the locale.__errβ Error flags to set.__tmβ Pointer to struct tm to fill in.
Returns: Iterator to first char beyond weekday name.
References: std::ios_base::_M_getloc(), std::ios_base::eofbit, std::ios_base::failbit, and std::ios_base::goodbit.
Referenced by: std::time_get< _CharT, _InIter >::get_weekday().
π do_get_year π
template<typename _CharT , typename _InIter > _InIter std::time_get< _CharT,
_InIter >::do_get_year (iter_type __beg, iter_type __end, ios_base &
__io, ios_base::iostate & __err, tm * __tm) const
tagged [protected], [virtual], [inherited]. π
Parse input year string. This function reads up to 4 characters to parse a year string and puts the results into a user-supplied struct tm. This function is a hook for derived classes to change the value returned.
See also: get_year() for details. π
Parameters
__begβ start of string to parse.__endβ end of string to parse.__ioβ source of the locale.__errβ error flags to set.__tmβ pointer tostruct tmto fill in.
Returns: iterator to first char beyond year. ποΈ
References: std::ios_base::_M_getloc(), std::ios_base::eofbit, std::ios_base::failbit, std::ios_base::goodbit, and std::__ctype_abstract_base< _CharT >::narrow().
Referenced by: std::time_get< _CharT, _InIter >::get_year().
get() β the char-format one π
template<typename _CharT , typename _InIter > iter_type std::time_get< _CharT, _InIter >::get (iter_type __s, iter_type __end, ios_base & __io, ios_base::iostate & __err, tm * __tm, char __format, char __modifier = 0) const [inline], [inherited]
Parse input string according to format. This function calls time_get::do_get with the provided parameters. Slay, delegated. β¨
See also: do_get() and get().
Parameters
__sβ start of string to parse.__endβ end of string to parse.__ioβ source of the locale.__errβ error flags to set.__tmβ pointer tostruct tmto fill in.__formatβ format specifier.__modifierβ format modifier.
Returns: iterator to first char not parsed. π«Ά
References: std::time_get< _CharT, _InIter >::do_get().
get() β the format-string one π
template<typename _CharT , typename _InIter > _InIter std::time_get< _CharT, _InIter >::get (iter_type __s, iter_type __end, ios_base & __io, ios_base::iostate & __err, tm * __tm, const char_type * __fmt, const char_type * __fmtend) const [inline], [inherited]
Parse input string according to format. This function parses the input string according to a provided format string. It does the inverse of time_put::put. The format string follows the format specified for strftime(3)/strptime(3). The actual parsing is done by time_get::do_get. Iconic little inverse-put situation, no cap. π₯
Parameters
__sβ start of string to parse.__endβ end of string to parse.__ioβ source of the locale.__errβ error flags to set.__tmβ pointer tostruct tmto fill in.__fmtβ start of the format string.__fmtendβ end of the format string.
Returns: iterator to first char not parsed. π
References: std::ios_base::_M_getloc(), std::time_get< _CharT, _InIter >::do_get(), std::ios_base::eofbit, std::ios_base::failbit, std::ios_base::goodbit, std::__ctype_abstract_base< _CharT >::is(), std::__ctype_abstract_base< _CharT >::narrow(), std::__ctype_abstract_base< _CharT >::tolower(), and std::__ctype_abstract_base< _CharT >::toupper().
get_date() π
template<typename _CharT , typename _InIter > iter_type std::time_get< _CharT, _InIter >::get_date (iter_type __beg, iter_type __end, ios_base & __io, ios_base::iostate & __err, tm * __tm) const [inline], [inherited]
Parse input date string. This function parses a date according to the format x and puts the results into a user-supplied struct tm. The result is returned by calling time_get::do_get_date().
If there is a valid date string according to format x, tm will be filled in accordingly and the returned iterator will point to the first character beyond the date string. If an error occurs before the end, err |= ios_base::failbit. If parsing reads all the characters, err |= ios_base::eofbit. Flag drama handled correctly, bestie. π€β¨
Parameters
__begβ start of string to parse.__endβ end of string to parse.__ioβ source of the locale.__errβ error flags to set.__tmβ pointer tostruct tmto fill in.
Returns: iterator to first char beyond date string. π
References: std::time_get< _CharT, _InIter >::do_get_date().
get_monthname() πΈ
template<typename _CharT , typename _InIter > iter_type std::time_get< _CharT, _InIter >::get_monthname (iter_type __beg, iter_type __end, ios_base & __io, ios_base::iostate & __err, tm * __tm) const [inline], [inherited]
Parse input month string. This function parses a month name and puts the results into a user-supplied struct tm. The result is returned by calling time_get::do_get_monthname().
Parsing starts by parsing an abbreviated month name. If a valid abbreviation is followed by a character that would lead to the full month name, parsing continues until the full name is found or an error occurs. Otherwise parsing finishes at the end of the abbreviated name. Abbrev-to-full glow-up pipeline, love that. π¦
If an error occurs before the end, err |= ios_base::failbit. If parsing reads all the characters, err |= ios_base::eofbit.
Parameters
__begβ start of string to parse.__endβ end of string to parse.__ioβ source of the locale.__errβ error flags to set.__tmβ pointer tostruct tmto fill in.
Returns: iterator to first char beyond month name. π
References: std::time_get< _CharT, _InIter >::do_get_monthname().
get_time() β°
template<typename _CharT , typename _InIter > iter_type std::time_get< _CharT, _InIter >::get_time (iter_type __beg, iter_type __end, ios_base & __io, ios_base::iostate & __err, tm * __tm) const [inline], [inherited]
Parse input time string. This function parses a time according to the format X and puts the results into a user-supplied struct tm. The result is returned by calling time_get::do_get_time().
If there is a valid time string according to format X, tm will be filled in accordingly and the returned iterator will point to the first character beyond the time string. If an error occurs before the end, err |= ios_base::failbit. If parsing reads all the characters, err |= ios_base::eofbit.
Parameters
__begβ start of string to parse.__endβ end of string to parse.__ioβ source of the locale.__errβ error flags to set.__tmβ pointer tostruct tmto fill in.
Returns: iterator to first char beyond time string. π°οΈ
References: std::time_get< _CharT, _InIter >::do_get_time().
get_weekday() ποΈ
template<typename _CharT , typename _InIter > iter_type std::time_get< _CharT, _InIter >::get_weekday (iter_type __beg, iter_type __end, ios_base & __io, ios_base::iostate & __err, tm * __tm) const [inline], [inherited]
Parse input weekday string. This function parses a weekday name and puts the results into a user-supplied struct tm. The result is returned by calling time_get::do_get_weekday().
Parsing starts by parsing an abbreviated weekday name. If a valid abbreviation is followed by a character that would lead to the full weekday name, parsing continues until the full name is found or an error occurs. Otherwise parsing finishes at the end of the abbreviated name. Same abbreviated-to-full-name excellence, periodt. π
If an error occurs before the end, err |= ios_base::failbit. If parsing reads all the characters, err |= ios_base::eofbit.
Parameters
__begβ start of string to parse.__endβ end of string to parse.__ioβ source of the locale.__errβ error flags to set.__tmβ pointer tostruct tmto fill in.
Returns: iterator to first char beyond weekday name. π
References: std::time_get< _CharT, _InIter >::do_get_weekday().
get_year() π§
template<typename _CharT , typename _InIter > iter_type std::time_get< _CharT, _InIter >::get_year (iter_type __beg, iter_type __end, ios_base & __io, ios_base::iostate & __err, tm * __tm) const [inline], [inherited]
Parse input year string. This function reads up to 4 characters to parse a year string and puts the results into a user-supplied struct tm. The result is returned by calling time_get::do_get_year().
4 consecutive digits are interpreted as a full year. If there are exactly 2 consecutive digits, the library interprets this as the number of years since 1900. Two-digit year math: lowkey vintage, highkey real. π°οΈ
If an error occurs before the end, err |= ios_base::failbit. If parsing reads all the characters, err |= ios_base::eofbit.
Parameters
__begβ start of string to parse.__endβ end of string to parse.__ioβ source of the locale.__errβ error flags to set.__tmβ pointer tostruct tmto fill in.
Returns: iterator to first char beyond year. π
References: std::time_get< _CharT, _InIter >::do_get_year().
ποΈ Member Data Documentation ποΈ
id β the static, inherited facet-ID situation:
template<typename _CharT , typename _InIter > locale::id std::time_get< _CharT, _InIter >::id [static], [inherited]
Numpunct facet id. Main character energy for a facet id, honestly. π
βοΈ Author βοΈ
Generated automatically by Doxygen for libstdc++ from the source code.
And the footer? Itβs the source/version + date line for this (3cxx) page β consider it acknowledged with a lil sparkle instead of copy-pasted, bestie. πβ¨
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms