STD::TIME_PUT_BYNAME(3)

πŸ’– std::time_put_byname< _CharT, _OutIter > πŸ’–

okay bestie, gather round, because today we're meeting std::time_put_byname< _CharT, _OutIter > β€” aka class time_put_byname [22.2.5.4]. it lives in the libstdc++ manual (section 3, library functions, you know the vibe ✨) and it is genuinely so good at what it does. let's get into it 🫢


🌸 NAME 🌸

std::time_put_byname< _CharT, _OutIter > β€” that's the class time_put_byname, [22.2.5.4]. periodt. πŸ’…


✨ SYNOPSIS ✨

first thing, the include, no notes:

#include <locale>

and it Inherits std::time_put< _CharT, _OutIter > β€” so all that parent energy is coming with it, fr fr.

πŸŽ€ Public Types πŸŽ€

  • typedef _CharT char_type
  • typedef _OutIter iter_type

πŸ’œ Public Member Functions πŸ’œ

  • time_put_byname (const char *, size_t __refs=0)
  • time_put_byname (const string &__s, size_t __refs=0)
  • iter_type put (iter_type __s, ios_base &__io, char_type __fill, const tm *__tm, char __format, char __mod=0) const β€” format and output a time or date πŸ•°οΈ
  • iter_type put (iter_type __s, ios_base &__io, char_type __fill, const tm *__tm, const _CharT *__beg, const _CharT *__end) const β€” format and output a time or date πŸ•°οΈ (yes, again, but with a format string this time, not a single char)

⭐ Static Public Attributes ⭐

  • static locale::id id β€” the Numpunct facet id.

πŸ¦‹ Protected Member Functions πŸ¦‹

  • virtual iter_type do_put (iter_type __s, ios_base &__io, char_type __fill, const tm *__tm, char __format, char __mod) const β€” format and output a time or date πŸ•°οΈ

🌈 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 _OutIter>
class std::time_put_byname< _CharT, _OutIter >

and the description of it is literally, verbatim, the name again: class time_put_byname [22.2.5.4]. iconic of it honestly, it knows its own name and it's not gonna elaborate. πŸ’€


πŸ”₯ Member Function Documentation πŸ”₯

🫢 do_put 🫢

template<typename _CharT, typename _OutIter>
_OutIter std::time_put< _CharT, _OutIter >::do_put
    (iter_type __s, ios_base & __io, char_type __fill, const tm * __tm,
     char __format, char __mod) const

tags on this one: [protected], [virtual], [inherited] β€” so it's a protected virtual hook that we got from the parent. slay.

Format and output a time or date. this function formats the data in struct tm according to the provided format char and optional modifier. and listen β€” this function is a hook for derived classes to change the value returned. so it's literally the "hey subclasses, do your thing" door πŸšͺ✨

See also: put() for more details.

Parameters:

  • __s β€” the stream to write to.
  • __io β€” source of locale.
  • __fill β€” char_type to use for padding.
  • __tm β€” Struct tm with date and time info to format.
  • __format β€” format char.
  • __mod β€” optional modifier char.

Returns: iterator after writing.

References std::ios_base::_M_getloc(), std::use_facet(), and std::__ctype_abstract_base< _CharT >::widen().

Referenced by put(), and put(). (both of them, bestie, it's popular πŸ’…)

πŸ“ put (the format-char one) πŸ“

template<typename _CharT, typename _OutIter>
iter_type std::time_put< _CharT, _OutIter >::put
    (iter_type __s, ios_base & __io, char_type __fill, const tm * __tm,
     char __format, char __mod = 0) const

tags: [inline], [inherited].

Format and output a time or date. formats the data in struct tm according to the provided format char and optional modifier. the format and modifier are interpreted as by strftime(). and it does so by returning time_put::do_put() β€” so it's basically the friendly front desk that sends you to do_put in the back office 🫑

Parameters:

  • __s β€” the stream to write to.
  • __io β€” source of locale.
  • __fill β€” char_type to use for padding.
  • __tm β€” Struct tm with date and time info to format.
  • __format β€” format char.
  • __mod β€” optional modifier char.

Returns: iterator after writing.

References do_put().

🧚 put (the format-string one) 🧚

template<typename _CharT, typename _OutIter>
_OutIter std::time_put< _CharT, _OutIter >::put
    (iter_type __s, ios_base & __io, char_type __fill, const tm * __tm,
     const _CharT * __beg, const _CharT * __end) const

tags: [inherited].

Format and output a time or date. this one formats the data in struct tm according to the provided format string (not just one char, we're fancy now). the format string is interpreted as by strftime().

Parameters:

  • __s β€” the stream to write to.
  • __io β€” source of locale.
  • __fill β€” char_type to use for padding.
  • __tm β€” Struct tm with date and time info to format.
  • __beg β€” start of format string.
  • __end β€” end of format string.

Returns: iterator after writing.

References std::ios_base::_M_getloc(), do_put(), std::__ctype_abstract_base< _CharT >::narrow(), and std::use_facet().


πŸ‘‘ Member Data Documentation πŸ‘‘

template<typename _CharT, typename _OutIter>
locale::id std::time_put< _CharT, _OutIter >::id

tags: [static], [inherited].

it's the Numpunct facet id. that's the whole description. short and mysterious, main character energy honestly 🌟


πŸ’Œ Author πŸ’Œ

Generated automatically by Doxygen for libstdc++ from the source code.


no cap, every option, overload, parameter and reference above is straight from the page β€” nothing dropped, nothing invented, just delivered with the correct amount of sparkle. πŸ’–

and that's the whole thing bestie!! this page is from the libstdc++ manual, it's the std::time_..._OutIter >(3) page (Library Functions Manual, section 3, the one and only), and it was written in the year of our lord whenever libstdc++ felt like it πŸŽ€βœ¨ mwah, go format some timestamps, you ate πŸ’…πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from
  • arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
  • centos-stream 10: gcc-toolset-15-libstdc++-docs 15.2.1-8.1.el10 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • centos-stream 10: gcc-toolset-16-libstdc++-docs 16.2.1-1.3.el10 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • centos-stream 10: libstdc++-docs 14.4.1-4.el10 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 44: libstdc++-docs 16.2.1-2.fc44
  • fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms