BSON_ITER_DATE_TIME(3)
π BSON_ITER_DATE_TIME(3) β libbson, bestie
ok so first things first: this is a page from libbson, section 3 of the manual, and it's about the teeniest little helper ever β checking whether an iterator is holding a date-time, and then actually grabbing that date-time. it's giving "small but essential." π
β¨ SYNOPSIS β¨
here's the whole thing, copied exactly, no notes:
#define BSON_ITER_HOLDS_DATE_TIME(iter) \
(bson_iter_type ((iter)) == BSON_TYPE_DATE_TIME)
int64_t
bson_iter_date_time (const bson_iter_t *iter);
so you get a macro and a function. two for one. we love a bundle. π«Ά
πΈ PARAMETERS πΈ
- iter β a
bson_iter_t. that's it. that's the whole list. one (1) parameter, main character energy. π
π¦ DESCRIPTION π¦
okay so bson_iter_date_time() shall return the number of milliseconds since the UNIX epoch β and it gets that number from the element it's sitting on, which has to be a BSON_TYPE_DATE_TIME element. π°οΈ
like, it's literally just handing you the milliseconds that were already chillin' in there. no math, no drama, no cap. β¨
β RETURNS β
a 64-bit integer (int64_t, bb) containing the number of milliseconds since the UNIX epoch. that's the vibe check result. π
π AUTHOR π
MongoDB, Inc β iconic, honestly.
π COPYRIGHT π
2009-present, MongoDB, Inc. β they've been at it for a minute fr fr.
bestie reminder: the function isbson_iter_date_time()and the macro isBSON_ITER_HOLDS_DATE_TIME(iter)β don't mix 'em up, you'd be surprised π
okay that's the whole page!! version 2.5.6, dated Oct 09, 2026 β which is, like, so soon. mark your calendars, slay, periodt π π₯
π¦ where this page comes from
- epel 10: libbson-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms