https://bugs.documentfoundation.org/show_bug.cgi?id=136615
--- Comment #10 from Albrecht Müller <[email protected]> --- (In reply to Mike Kaganski from comment #9) > … so the question remains, how the fractions of a > date are calculated here, to be discarded. You just discovered another bug in the specification: The sentence you refer to should have a clear meaning. By the way, take it together with > 4.3.3 Date > Date is a subtype of Number. > Date is represented by an integer value. This means a date value by definition has no hours, minutes or seconds to discard. So what is the intended meaning of "truncate(date)" anyway? What are *related* functions? Assume T = 1999-12-31 23:59:59,600. LibreOffice Version 7.0.4.2 returns 1999 for YEAR(T) and 0 (i.e. no) for ISLEAPYEAR(T). What will happen after you implemented the proposed changes? YEAR(T) = 2000 and ISLEAPYEAR(T) = no? Or Assume T1 = 2021-12-15 23:59:59,600 and T2 = 2021-12-16 00:00:00,000. LibreOffice 7.0.4.2 delivers the following results: DAY(T1) = 15, DAY(T2) = 16, NETWORKDAYS(T1;T2) = 2 and NETWORKDAYS(T2;T2) = 1. After the changes I would expect DAY(T1) = DAY(T2) = 16, but what NETWORKDAYS should return? The same results as before despite the fact that - according to the YEAR, MONTH, DAY … functions - the arguments appear to be identical? The headline of OFFICE-4094 contains the clause "… and other related" but I did not see a list that names these functions. That's why I looked for things that I think are related to the intended changes to get some starting point. Unfortunately the resulting list became pretty long. I also thought that having names for different semantics of date and time values makes it easier to talk about the differences and their consequences, e.g. when you have to trade consistency in one part for inconsistencies somewhere else. One example is interoperability: I tried NETWORKDAYS on Exel97 and got the impression, that NETWORKDAYS uses truncating semantics, while the YEAR, MONTH … functions use rounding semantics. As I don't have a current version available I cannot check if Microsoft changed this behaviour later. If they did not, you have to choose if you want to have internal consistency or compatibility with Excel. > Trying to create noise … is not constructive. OK, with these remarks I conclude the noise. -- You are receiving this mail because: You are the assignee for the bug.
