Contact

DAYSINYEAR in Collabora Office: Use the Correct Calendar-Year Day Count

Date & Time Intermediate Collabora Office Calc

Calculate Collabora DAYSINYEAR, audit leap-year denominators and split cross-year intervals before applying year-specific arithmetic.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: =DAYSINYEAR(DATE(2024;6;1)) has independently expected result 366. The function returns the day count of the calendar year containing its date argument.

Syntax and input meaning

=DAYSINYEAR(Date)

Date is one valid date in the year of interest. The dedicated Collabora reference documents 366 for a valid February 29, 1968 date and warns that the Date parameter must be valid under the application’s locale settings.

Use a date such as DATE(2024;1;1), not the bare number 2024. The latter is a numeric date serial rather than an explicit year field. Any valid day in the same calendar year gives the same intended day count.

The result is a number of days, not the number of days already elapsed or remaining in that year. Those are separate calculations using the input’s position within the calendar.

Example 1: compare four years

Enter =DATE(2023;7;1), =DATE(2024;7;1), =DATE(2000;7;1) and =DATE(2100;7;1) in A2:A5. In B2 enter =DAYSINYEAR(A2) and fill down.

Independent Gregorian targets are 365, 366, 366, 365. The century examples show why divisibility by four alone is insufficient: 2000 is a leap year, while 2100 is not.

These are modern-calendar mathematical controls. They do not establish every historical calendar convention or cross-application serial-date equivalence.

Example 2: separate full-year length from remaining days

For =DATE(2024;12;31), DAYSINYEAR still targets 366, even though the date is the final day of that year. It does not return one.

To count dates from a valid input A2 through the end of its year inclusively, an explicit date arithmetic expression is =DATE(YEAR(A2)+1;1;1)-A2 for date-only values. For December 31, 2024 its independent target is 1. For January 1, 2024 it is 366.

A hidden time fraction changes that subtraction, so decide whether the model accepts timestamps or requires date-only inputs before using it.

Advanced application: reconcile month and year totals

Create twelve dates, one in each month of 2024, and apply DAYSINMONTH to each. Their total targets 366, agreeing with DAYSINYEAR for any 2024 date.

This is a useful calendar-table control: if the monthly sum is 365 while the year function returns 366, check for a repeated, omitted or wrong-year month. A matching total alone does not prove every month is correct, so retain the month-by-month values as well.

Advanced application: split a cross-year interval

For the date-only interval from December 31, 2023 to January 2, 2024, excluding the end date, there is one day in 2023 and one in 2024. A year-specific daily fraction model would use 1/365 + 1/366, approximately 0.005471966.

Dividing the whole two-day interval by just the start year’s 365 or the end year’s 366 gives a different value. DAYSINYEAR supplies a denominator for a particular year; it does not split the interval or choose a contractual day-count convention.

This example illustrates arithmetic only. Any real accrual or billing rule must define its treatment of year boundaries and endpoints independently of the spreadsheet function.

Errors and troubleshooting

Use actual dates or DATE expressions and a numeric output format. If 365 or 366 appears as a date, the stored result may be correct but the display format is wrong.

The dedicated help does not establish all invalid-input error codes, time-fraction behavior or extreme historical ranges. Those remain unverified. Do not infer a native execution result from the documentation’s version number.

Availability, format and verification

Collabora Office 26.04 desktop help documents this exact function. The saved source was retrieved on 2026-10-13 and hash-verified for this guide on October 15, 2026. It identifies the namespace ORG.OPENOFFICE.DAYSINYEAR and says the function is outside the cited OpenFormula 1.3 standard. This is not cross-product semantic certification.

The first introduced release and last functioning version are unknown. Online/mobile availability is not inferred. No native Collabora or WPS execution was performed. Results are independent calendar/string controls or explicitly identified documented examples. English names and semicolon separators are used.

References