Sugar.DateTime under Elements 10

Hi,

I’m still using Sugar.DateTime ( modified to compile under Elements 10)
DateTime.pas (34.8 KB)
and I have problem with it

vStartOfTheMonth := new Sugar.DateTime(2018, 3, 1);
vEndOfTheMonth := new Sugar.DateTime(2018, 3, 1).AddMonths(1).AddDays(-1);

Starting date is set, then ending date is set and starting date is changing. Any idea what could be wrong? I can’t understand how one assignment can change the other one.

I’m afraid Sugar is not supported (and does not build) in Elements 10 anymore, in favor for Elements RTL. Did this work ok in v9? Any good reason not to use Elements RTL’s DateTime?

One good reason - WPF Binding do not work with RTL DateTime

I also need local Now i RTL.DateTime, but it’s not the biggest problem :slight_smile:

Sugar.DateTime with some little changes compile under Elements 10 - uploaded in my first post. I’ve just installed Elements 9 and the same code works ok.

ok, can you give me a small complete testcase project that shows Add not working? i’ll then have a look. might be new bug in mapped types. platform is .NET, i assume, yes?

yes it’s .NET - I’ll make simple test case

ConsoleApplication1.zip (33.5 KB)

Thanks, logged as bugs://79711

bugs://79711 got closed with status fixed.