class ICU4XIsoDate; #include"ICU4XError.hpp" class ICU4XCalendar; class ICU4XDate; #include"ICU4XIsoWeekday.hpp" class ICU4XWeekCalculator; struct ICU4XWeekOf;
/** * A destruction policy for using ICU4XIsoDate with std::unique_ptr.
*/ struct ICU4XIsoDateDeleter { voidoperator()(capi::ICU4XIsoDate* l) const noexcept {
capi::ICU4XIsoDate_destroy(l);
}
};
/** * Creates a new [`ICU4XIsoDate`] from the specified date and time. * * See the [Rust documentation for `try_new_iso_date`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.try_new_iso_date) for more information.
*/ static diplomat::result<ICU4XIsoDate, ICU4XError> create(int32_t year, uint8_t month, uint8_t day);
/** * Returns the week number in this month, 1-indexed, based on what * is considered the first day of the week (often a locale preference). * * `first_weekday` can be obtained via `first_weekday()` on [`ICU4XWeekCalculator`] * * See the [Rust documentation for `week_of_month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month) for more information.
*/
uint32_t week_of_month(ICU4XIsoWeekday first_weekday) const;
/** * Returns the week number in this year, using week data * * See the [Rust documentation for `week_of_year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year) for more information.
*/
diplomat::result<ICU4XWeekOf, ICU4XError> week_of_year(const ICU4XWeekCalculator& calculator) const;
/** * Returns the number of days in the year represented by this date * * See the [Rust documentation for `days_in_year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year) for more information.
*/
uint16_t days_in_year() const; inlineconst capi::ICU4XIsoDate* AsFFI() const { return this->inner.get(); } inline capi::ICU4XIsoDate* AsFFIMut() { return this->inner.get(); } inlineexplicit ICU4XIsoDate(capi::ICU4XIsoDate* i) : inner(i) {}
ICU4XIsoDate() = default;
ICU4XIsoDate(ICU4XIsoDate&&) noexcept = default;
ICU4XIsoDate& operator=(ICU4XIsoDate&& other) noexcept = default; private:
std::unique_ptr<capi::ICU4XIsoDate, ICU4XIsoDateDeleter> inner;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.