dayFromYear

Calculates the number of days elapsed since 1 January 1970 until 1 January of the given year.

pure
int
dayFromYear
(
int year
)

Parameters

year int

The year to compute the number of days from.

Return Value

Type: int

The number of days elapsed.

Examples

writeln(dayFromYear(1970)); // writes '0'
writeln(dayFromYear(1971)); // writes '365'
writeln(dayFromYear(1972)); // writes '730'
Suggestion Box / Bug Report