[#BloombergLP-bdlt-PosixDateImpUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::PosixDateImpUtil :relfileprefix: ../../ :mrdocs: Namespace for low‐level POSIX‐calendar date conversion utilities. == Synopsis Declared in `<bdlt_posixdateimputil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct PosixDateImpUtil; ---- == Description This `struct` provides a namespace for a suite of pure functions that perform low‐level operations on date values in a variety of formats. Note that all of these functions, whether or not implemented in terms of a static cache, are stateless, and, as such, are inherently thread‐safe. == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlt/PosixDateImpUtil/isLeapYear.adoc[`isLeapYear`] | Return `true` if the specified `year` is a leap year, and `false` otherwise. The behavior is undefined unless `1 <= year <= 9999`. | xref:BloombergLP/bdlt/PosixDateImpUtil/isValidSerial.adoc[`isValidSerial`] | Return whether `serialDay` is a valid serial date value. | xref:BloombergLP/bdlt/PosixDateImpUtil/isValidYearDay.adoc[`isValidYearDay`] | Return whether `year` and `dayOfYear` form a valid date. | xref:BloombergLP/bdlt/PosixDateImpUtil/isValidYearMonthDay.adoc[`isValidYearMonthDay`] | Return whether `year`/`month`/`day` is a valid POSIX calendar date. | xref:BloombergLP/bdlt/PosixDateImpUtil/isValidYearMonthDayNoCache.adoc[`isValidYearMonthDayNoCache`] | Return whether YMD is valid without using the date cache. | xref:BloombergLP/bdlt/PosixDateImpUtil/lastDayOfMonth.adoc[`lastDayOfMonth`] | Return the last day of month for the given year and month. | xref:BloombergLP/bdlt/PosixDateImpUtil/numLeapYears.adoc[`numLeapYears`] | Return the number of leap years between `year1` and `year2` inclusive. | xref:BloombergLP/bdlt/PosixDateImpUtil/serialToDay.adoc[`serialToDay`] | Return the day (of the month) of the date value indicated by the specified `serialDay`. The behavior is undefined unless `true == isValidSerial(serialDay)`. | xref:BloombergLP/bdlt/PosixDateImpUtil/serialToDayNoCache.adoc[`serialToDayNoCache`] | Return the day of month for `serialDay` without using the date cache. | xref:BloombergLP/bdlt/PosixDateImpUtil/serialToDayOfWeek.adoc[`serialToDayOfWeek`] | Return the day of week (1=SUN .. 7=SAT) for the given serial day. | xref:BloombergLP/bdlt/PosixDateImpUtil/serialToDayOfYear.adoc[`serialToDayOfYear`] | Return the day of the year of the date value indicated by the specified `serialDay`. The behavior is undefined unless `true == isValidSerial(serialDay)`. | xref:BloombergLP/bdlt/PosixDateImpUtil/serialToMonth.adoc[`serialToMonth`] | Return the month of the date value indicated by the specified `serialDay`. The behavior is undefined unless `true == isValidSerial(serialDay)`. | xref:BloombergLP/bdlt/PosixDateImpUtil/serialToMonthNoCache.adoc[`serialToMonthNoCache`] | Return the month for `serialDay` without using the date cache. | xref:BloombergLP/bdlt/PosixDateImpUtil/serialToYd.adoc[`serialToYd`] | Load year and day‐of‐year from the given serial day. | xref:BloombergLP/bdlt/PosixDateImpUtil/serialToYear.adoc[`serialToYear`] | Return the year of the date value indicated by the specified `serialDay`. The behavior is undefined unless `true == isValidSerial(serialDay)`. | xref:BloombergLP/bdlt/PosixDateImpUtil/serialToYearNoCache.adoc[`serialToYearNoCache`] | Return the year for `serialDay` without using the date cache. | xref:BloombergLP/bdlt/PosixDateImpUtil/serialToYmd.adoc[`serialToYmd`] | Load year, month, and day from the given serial day. | xref:BloombergLP/bdlt/PosixDateImpUtil/serialToYmdNoCache.adoc[`serialToYmdNoCache`] | Load YMD from `serialDay` without using the date cache. | xref:BloombergLP/bdlt/PosixDateImpUtil/ydToDay.adoc[`ydToDay`] | Return the day of month for the given year and day‐of‐year. | xref:BloombergLP/bdlt/PosixDateImpUtil/ydToDayOfWeek.adoc[`ydToDayOfWeek`] | Return the day of week (1=SUN .. 7=SAT) for year and day‐of‐year. | xref:BloombergLP/bdlt/PosixDateImpUtil/ydToMd.adoc[`ydToMd`] | Load month and day from the given year and day‐of‐year. | xref:BloombergLP/bdlt/PosixDateImpUtil/ydToMonth.adoc[`ydToMonth`] | Return the month of the date value indicated by the specified `year` and `dayOfYear`. The behavior is undefined unless `true == isValidYearDay(year, dayOfYear)`. | xref:BloombergLP/bdlt/PosixDateImpUtil/ydToSerial.adoc[`ydToSerial`] | Return the serial date for the given year and day‐of‐year. | xref:BloombergLP/bdlt/PosixDateImpUtil/ymdToDayOfWeek.adoc[`ymdToDayOfWeek`] | Return the day of week (1=SUN .. 7=SAT) for the given YMD date. | xref:BloombergLP/bdlt/PosixDateImpUtil/ymdToDayOfYear.adoc[`ymdToDayOfYear`] | Return the day of year for the given year, month, and day. | xref:BloombergLP/bdlt/PosixDateImpUtil/ymdToSerial.adoc[`ymdToSerial`] | Return the serial date for the given year, month, and day. | xref:BloombergLP/bdlt/PosixDateImpUtil/ymdToSerialNoCache.adoc[`ymdToSerialNoCache`] | Return the serial date for YMD without using the date cache. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#