Returns the day‐of‐year for the given (realigned) civil‐time value.

Synopsis

Declared in <absl/time/civil_time.h>

int
GetYearDay(CivilSecond cs);

Description

Example:

absl::CivilDay a(2015, 1, 1); int yd_jan_1 = absl::GetYearDay(a); // yd_jan_1 = 1 absl::CivilDay b(2015, 12, 31); int yd_dec_31 = absl::GetYearDay(b); // yd_dec_31 = 365

Return Value

The one‐based day‐of‐year on which cs falls.

Parameters

Name

Description

cs

The civil‐time value to inspect.

Created with MrDocs