DisplayTextDateFormatSupport

DisplayTextDateFormatSupport

Overview

DisplayTextDateFormatSupport is a class in Aspose.Cells FOSS for C++.

Internal helper methods for formatting date/time display text.

Methods

SignatureDescription
FormatDateTimeValue(value: DateTime, formatCode: std::string_view, culture: std::locale)std::stringFormats a DateTime value according to the given format code and locale.
FormatElapsedTimeValue(time: std::chrono::duration<double>, formatCode: std::string_view, culture: std::locale)std::stringFormats a TimeSpan value according to the given format code and locale.
IsElapsedToken(token: std::string_view)boolReturns true if the token (case-insensitive) is an elapsed-time token such as h, hh, m, mm, s, or ss.
ContainsElapsedTimeToken(formatCode: std::string_view)boolScans for bracketed elapsed-time tokens in the format code.
MatchesToken(formatCode: std::string_view, startIndex: int, token: std::string_view)boolTests whether the substring starting at startIndex matches token (case-insensitive).
CountRepeated(formatCode: std::string_view, startIndex: int, token: char)intCounts consecutive occurrences of the character at startIndex.
IsMinuteContext(formatCode: std::string_view, startIndex: int, count: int)boolDetermines whether an ’m’/‘M’ sequence at the given position is in a minute context (rather than a month context).
FindNeighborToken(formatCode: std::string_view, startIndex: int, direction: int)charFinds the nearest non-whitespace, non-escape token character in the given direction from startIndex. Returns ‘\0’ if none is found.

See Also