Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi Andrew,

My primary concerns

1. Change in behavior that may break existing code.
the intent of the patch is to restore the previous behaviour ( by previous behaviour I mean before integration of the feature that erroneously removed the 'special' processing for '+' for dates ). Additionally the intent of the patch is to make the behaviour for '-' similar for'+' e.g. if Date + 1 gives a Date then surely Date - 1 should additionally give back at Date. Hopefully that makes sense :-)

2. Previous behavior was never flagged as an issue, and may arguably be considered logical to some. for example, storing a "delta" in the native type.
I don't think we should be afraid to change present behaviour if we think it is wrong and especially if the impact is probably going to be very minor ( as I think is the case here ). I would bet that the behaviour we have at the moment is an incomplete attempt to behave in a compatible way with vba. Where we can, I think if the cost is low we should try to be compatible ( should actually look at what vba does [*]). But... I take it that you are unhappy with changing the treatment of '-' ? and wouldn't be in favour of the change right? ( funny somehow I thought in the previous mail thread that you were in favour of even letting the Date type be set for all those numeric operations, sorry I misunderstood you )

3. The rules are more complicated now and require complex examples to explain; for example, time_1 + time_2 + time_3 returns a date but time_1 + time_2 does not. We cannot simply state that math done with dates or including a date returns a date.
yeah that doesn't sound right :-/  should remain a Date I would think

[*] table of behaviour in vba, pre the bug being introduced and post patch

                               mso    old behaviour  present
                            --------------------------------
date + num                    Date      Date          Date
date - num                    Date      Double        Date
date * num                    Double    Double        Double
date / num                    Double    Double        Double
date + date                   Date      Double        Double [1]
date - date                   Double    Double        Double
date * date                   Double    Double        Double

[1] the date + date is clearly wrong (fixing that would address '3.' above. )

personally I am all for fixing this to be compatible

Noel


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.