Talk:Documentation/Calc Functions/DATEDIF

SF Comments

 * (1) Summary. Suggest the following replacement text – “Determines the difference between two dates, returning the result in days, months, or years as specified in the arguments.”.
 * (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 replacement text – “Returns a non-negative integer which is the difference between two date-time sequence numbers in days, months, or years (as specified in the Interval argument)”.
 * (4) Arguments, Start date. Suggest the following replacement text – “Start date is the date (in quotation marks) or a date-time sequence number, or a reference to the cell containing one of those types, which is the start date of the period for which the calculation is to be carried out.”
 * (5) Arguments, End date. Suggest the following replacement text – “End date is the date (in quotation marks) or a date-time sequence number, or a reference to the cell containing one of those types, which is the end date of the period for which the calculation is to be carried out. End date must be later than Start date.”
 * (6) Arguments, Interval. Suggest the following replacement text – “Interval is a string, or a reference to a cell containing that string, which determines which result is returned. The accepted values are listed in the following table.”. Please state that these strings are not case sensitive.
 * (7) Arguments, insert new bullet. A statement is needed to reflect that an invalid argument error (Err:502) occurs if the Start date is later than the End date.
 * (8) Arguments, insert new bullet. A statement is needed to reflect that an invalid argument error (Err:502) occurs if Interval does not match one of the six expected strings.
 * (9) Additional details. Delete both items.
 * (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) Examples, 1st example. Suggest rewording the Description as – “Here the function calculates the difference between the two dates in whole years. The man is 38 years old.”.
 * (13) Examples, 2nd example. Suggest rewording the Description as – “Here the function calculates the difference between the two dates in whole months, ignoring years and days. Using the result of the previous example, the man is 38 years and 1 month old.”.
 * (14) Examples, 3rd example. Suggest rewording the Description as – “Here the function calculates the difference between the two dates in whole days, ignoring years and months. Using the results of the previous examples, the man is 38 years, 1 month, and 27 days old.”
 * (15) Examples, 4th example. Suggest rewording the Description as – “Here the function calculates the difference between the two dates in whole months. The man has been alive for 457 months.”.
 * (16) Examples, 5th example. Suggest rewording the Description as – “Here the function calculates the difference between the two dates in whole days. The man has been alive for 13937 days.”
 * (17) Examples, 6th example. Suggest rewording the Description as – “Here the function calculates the difference between the two dates in whole days, ignoring years. The man’s birthday was 57 days ago.”.

--Stevefanning (talk) 2020-12-27T17:54:12 (UTC)

My comments listed above addressed on 2021-02-11. --Stevefanning (talk) 2021-02-11T16:56:41 (UTC)