A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1FormattedDateInterval.html below:

ICU 77.1: icu::FormattedDateInterval Class Reference

An immutable class containing the result of a date interval formatting operation. More...

#include <dtitvfmt.h>

An immutable class containing the result of a date interval formatting operation.

Instances of this class are immutable and thread-safe.

When calling nextPosition(): The fields are returned from left to right. The special field category UFIELD_CATEGORY_DATE_INTERVAL_SPAN is used to indicate which datetime primitives came from which arguments: 0 means fromCalendar, and 1 means toCalendar. The span category will always occur before the corresponding fields in UFIELD_CATEGORY_DATE in the nextPosition() iterator.

Not intended for public subclassing.

Stable:
ICU 64

Definition at line 59 of file dtitvfmt.h.

◆ FormattedDateInterval() [1/2] icu::FormattedDateInterval::FormattedDateInterval ( ) inline ◆ FormattedDateInterval() [2/2] ◆ ~FormattedDateInterval() virtual icu::FormattedDateInterval::~FormattedDateInterval ( ) overridevirtual ◆ appendTo() ◆ nextPosition()

Iterates over field positions in the FormattedValue.

This lets you determine the position of specific types of substrings, like a month or a decimal separator.

To loop over all field positions:

ConstrainedFieldPosition cfpos;
while (fmtval.nextPosition(cfpos, status)) {
    // handle the field position; get information from cfpos
}
Parameters
Returns
true if a new occurrence of the field was found; false otherwise or if an error was set.
Stable:
ICU 64

Implements icu::FormattedValue.

◆ operator=() ◆ toString() ◆ toTempString()

Returns the formatted string as a read-only alias to memory owned by the FormattedValue.

The return value is valid only as long as this FormattedValue is present and unchanged in memory. If you need the string outside the current scope, consider toString.

The buffer returned by calling UnicodeString::getBuffer() on the return value is guaranteed to be NUL-terminated.

Parameters
status Set if an error occurs.
Returns
a temporary UnicodeString containing the formatted string.
Stable:
ICU 64

Implements icu::FormattedValue.

The documentation for this class was generated from the following file:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4