BloombergLP::bdlt::DateUtil

This struct provides a namespace for utility functions that provide non-primitive operations on dates.

Synopsis

Declared in <bdlt_dateutil.h>

struct DateUtil;

Static Member Functions

NameDescription
addMonths Return original advanced by numMonths, optionally preserving EOM.
addMonthsEom Return original advanced by numMonths with end-of-month rules.
addMonthsNoEom Return original advanced by numMonths without EOM preservation.
addYears Return original advanced by numYears, optionally preserving EOM.
addYearsEom Return original advanced by numYears with end-of-month rules.
addYearsNoEom Return original advanced by numYears without EOM preservation.
convertFromYYYYMMDD Load *result from the "YYYYMMDD" encoding of yyyymmddValue.
convertFromYYYYMMDDRaw Return the Date represented by the "YYYYMMDD" value yyyymmddValue.
convertToYYYYMMDD Return the "YYYYMMDD" integer encoding of the specified date.
earliestDayOfWeekInMonth Return the earliest dayOfWeek in the given month and year.
fromYmd Return a Date for year/month/day if valid; otherwise empty.
isValidYYYYMMDD Return true if the specified yyyymmddValue represents a valid Date value in the "YYYYMMDD" format, and false otherwise.
lastDayInMonth Return the latest date in the specified month of the specified year. The behavior is undefined unless 1 <= year <= 9999 and 1 <= month <= 12.
lastDayOfWeekInMonth Return the latest dayOfWeek in the given month and year.
nextDayOfWeek Return the next occurrence of dayOfWeek after date.
nextDayOfWeekInclusive Return the next occurrence of dayOfWeek on or after date.
nthDayOfWeekInMonth Return the nth dayOfWeek in the given month and year.
previousDayOfWeek Return the previous occurrence of dayOfWeek before date.
previousDayOfWeekInclusive Return the previous occurrence of dayOfWeek on or before date.