MCPcopy Create free account
hub / github.com/apache/arrow / garrow_week_options_class_init

Function garrow_week_options_class_init

c_glib/arrow-glib/compute.cpp:10394–10457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10392}
10393
10394static void
10395garrow_week_options_class_init(GArrowWeekOptionsClass *klass)
10396{
10397 auto gobject_class = G_OBJECT_CLASS(klass);
10398
10399 gobject_class->set_property = garrow_week_options_set_property;
10400 gobject_class->get_property = garrow_week_options_get_property;
10401
10402 auto options = arrow::compute::WeekOptions::Defaults();
10403
10404 GParamSpec *spec;
10405 /**
10406 * GArrowWeekOptions:week-starts-monday:
10407 *
10408 * What day does the week start with (Monday=true, Sunday=false).
10409 *
10410 * Since: 23.0.0
10411 */
10412 spec =
10413 g_param_spec_boolean("week-starts-monday",
10414 "Week starts Monday",
10415 "What day does the week start with (Monday=true, Sunday=false)",
10416 options.week_starts_monday,
10417 static_cast<GParamFlags>(G_PARAM_READWRITE));
10418 g_object_class_install_property(gobject_class,
10419 PROP_WEEK_OPTIONS_WEEK_STARTS_MONDAY,
10420 spec);
10421
10422 /**
10423 * GArrowWeekOptions:count-from-zero:
10424 *
10425 * Dates from current year that fall into last ISO week of the previous year
10426 * return 0 if true and 52 or 53 if false.
10427 *
10428 * Since: 23.0.0
10429 */
10430 spec = g_param_spec_boolean("count-from-zero",
10431 "Count from zero",
10432 "Dates from current year that fall into last ISO week of "
10433 "the previous year return 0 if true and 52 or 53 if false",
10434 options.count_from_zero,
10435 static_cast<GParamFlags>(G_PARAM_READWRITE));
10436 g_object_class_install_property(gobject_class, PROP_WEEK_OPTIONS_COUNT_FROM_ZERO, spec);
10437
10438 /**
10439 * GArrowWeekOptions:first-week-is-fully-in-year:
10440 *
10441 * Must the first week be fully in January (true), or is a week that begins
10442 * on December 29, 30, or 31 considered to be the first week of the new
10443 * year (false)?
10444 *
10445 * Since: 23.0.0
10446 */
10447 spec = g_param_spec_boolean(
10448 "first-week-is-fully-in-year",
10449 "First week is fully in year",
10450 "Must the first week be fully in January (true), or is a week that begins on "
10451 "December 29, 30, or 31 considered to be the first week of the new year (false)?",

Callers

nothing calls this directly

Calls 1

DefaultsFunction · 0.50

Tested by

no test coverage detected