Talk:Documentation/Calc Functions/DAYS

From The Document Foundation Wiki
Jump to navigation Jump to search

SF Comments

(1) Summary. Do these two sentences say anything different or is the second repetition of the first? Suggest the following (simpler) replacement paragraph – “Calculates the number of days between two dates.”.
(2) Summary. Suggest including the following as a tip – “To keep dates from being interpreted as parts of formulas use the DATE function, for example, DATE(1954;7;20), or place the date in quotation marks and use the ISO 8601 notation, for example, "1954-07-20". Avoid using locale dependent date formats such as "07/20/54", the calculation may produce errors if the document is loaded under different locale settings.”.
(3) Returns. Suggest the following re-word – “Returns a real number which is the difference between the two given dates in days.”
(4) Arguments, Date1. Suggest the following replacement text – “Date1 is a date-time (in quotation marks) or a date-time sequence number, or a reference to the cell containing one of those types, which is either the start date or the end date of the period for which the calculation is to be carried out.”
(5) Arguments, Date2. Suggest the following replacement text – “Date2 is a date-time (in quotation marks) or a date-time sequence number, or a reference to the cell containing one of those types, which is either the end date or the start date of the period for which the calculation is to be carried out.”
(6) Arguments, second paragraph. Suggest moving this to a bullet point and re-wording as follows – “If Date2 is earlier than Date1, the result is a negative number; if Date2 is later than Date1, the result is a positive number.”.
(7) Arguments, existing bullet. Change “date” to “dates”.
(8) Arguments, new bullet. Insert a statement to reflect that either or both arguments can include time as well as date – for example, “2020-12-08T21:30:00” or 42711.90. In such cases the value returned may include a fractional part.
(9) Additional details. Please delete the current contents of this section.
(10) Additional details, new paragraph. “The description on this page uses the international standard ISO 8601 date format for clarity because this does not depend on locale; for example, 26th December 2020 is shown as 2020-12-26. The default date format on your computer may be different.”
(11) Additional details, new paragraph. “Calc handles date-time values as numbers, known as date-time sequence numbers. For example, 12:00 PM on 2000-01-01, converts to 36526.5 (assuming that day zero is the default 1899-12-30). The value preceding the decimal point corresponds to the date; the value following the decimal point corresponds to the time. Times are represented as a fraction of a day - for example 0.5 is half a day, or 12 hours, or 12 noon; 0.25 is a quarter of a day, or 6 am.”
(12) Additional details, new paragraph. “The formula for this function is DAYS = Date2Date1.”
(13) Additional details, new paragraph. I think we should include a statement that this function is not identical to Excel’s DAYS function, which does not take account of time values that are parts of the dates.
(14) Examples, general. It would be useful to have one or more examples for which the returned value includes a fractional part.
(15) Examples, 1st example. Change “and” to “to”.
(16) Examples, 3rd example. Change “and” to “to”. Remove space in “Date 2”.

My comments listed above addressed on 2021-02-13. --Stevefanning (talk) 2021-02-13T11:30:21 (UTC)