[#BloombergLP-bdlt-ProlepticDateImpUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::ProlepticDateImpUtil :relfileprefix: ../../ :mrdocs: Provide low‐level support functions for proleptic Gregorian dates. == Synopsis Declared in `<bdlt_prolepticdateimputil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct ProlepticDateImpUtil; ---- == 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: year/month/day, year/day‐of‐year, and serial date. Dates in the range `[0001/01/01 .. 9999/12/31]` that are valid per the proleptic Gregorian calendar are supported, with serial date 1 (3652059) corresponding to `0001/01/01` (`9999/12/31`). Note that all of the 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/ProlepticDateImpUtil/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/ProlepticDateImpUtil/isValidSerial.adoc[`isValidSerial`] | Return `true` if `serialDay` is a valid serial date value. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/isValidYearDay.adoc[`isValidYearDay`] | Return `true` if `year`/`dayOfYear` is a valid date value. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/isValidYearMonthDay.adoc[`isValidYearMonthDay`] | Return `true` if `year`/`month`/`day` is a valid date value. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/isValidYearMonthDayNoCache.adoc[`isValidYearMonthDayNoCache`] | Return whether `year`/`month`/`day` is valid without using the cache. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/lastDayOfMonth.adoc[`lastDayOfMonth`] | Return the last day of the specified month in the specified year. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/numLeapYears.adoc[`numLeapYears`] | Return the number of leap years between `year1` and `year2`. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/serialToDay.adoc[`serialToDay`] | Return the day of the month for the specified serial date. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/serialToDayNoCache.adoc[`serialToDayNoCache`] | Return the day of month for `serialDay` without using the cache. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/serialToDayOfWeek.adoc[`serialToDayOfWeek`] | Return the day of the week for the specified serial date. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/serialToDayOfYear.adoc[`serialToDayOfYear`] | Return the day of the year for the specified serial date. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/serialToMonth.adoc[`serialToMonth`] | Return the month for the specified serial date. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/serialToMonthNoCache.adoc[`serialToMonthNoCache`] | Return the month for `serialDay` without using the date cache. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/serialToYd.adoc[`serialToYd`] | Load the year‐day representation of the specified serial date. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/serialToYear.adoc[`serialToYear`] | Return the year for the specified serial date. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/serialToYearNoCache.adoc[`serialToYearNoCache`] | Return the year for `serialDay` without using the date cache. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/serialToYmd.adoc[`serialToYmd`] | Load the year/month/day representation of the specified serial date. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/serialToYmdNoCache.adoc[`serialToYmdNoCache`] | Load YMD for `serialDay` without using the date cache. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/ydToDay.adoc[`ydToDay`] | Return the day of the month for the specified year and day‐of‐year. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/ydToDayOfWeek.adoc[`ydToDayOfWeek`] | Return the day of the week for the specified year and day‐of‐year. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/ydToMd.adoc[`ydToMd`] | Load the month and day for the specified year and day‐of‐year. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/ydToMonth.adoc[`ydToMonth`] | Return the month for the specified year and day‐of‐year. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/ydToSerial.adoc[`ydToSerial`] | Return the serial date for the specified year and day‐of‐year. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/ymdToDayOfWeek.adoc[`ymdToDayOfWeek`] | Return the day of the week for the specified year, month, and day. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/ymdToDayOfYear.adoc[`ymdToDayOfYear`] | Return the day of the year for the specified year, month, and day. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/ymdToSerial.adoc[`ymdToSerial`] | Return the serial date for the specified year, month, and day. | xref:BloombergLP/bdlt/ProlepticDateImpUtil/ymdToSerialNoCache.adoc[`ymdToSerialNoCache`] | Return the serial date for YMD without using the date cache. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#