Not sure if by design; however, if I have a date set to “2015-05-05 15:15:15” (myDateObject) and create a dateInterval with minutes set to 59… myDateObject becomes “2015-05-05 15:14:15” The time doesn’t appear to be wrapping around and counting over to the hours part. Is this by design?
What is your code? This works as I expect:
Dim d As New Xojo.Core.Date(2015, 15, 15, 15, 15, 15, Xojo.Core.TimeZone.Current)
Dim di As New Xojo.Core.DateInterval
di.Minutes = 59
Dim newDate As Xojo.Core.Date = d + di
' d = 2016-03-15 15:15:15
' newDate = 2016-03-15 16:14:15
Sending a link via PM… thanks Paul.
Not sure if you had time to review my PM; however, on Windows IDE (2015r2.4):
[code] dim a as new xojo.core.date(2015, 05, 15, 15, 15, 15, xojo.core.timeZone.current)
dim b as new xojo.core.dateInterval
b.minutes = 35
dim c as xojo.core.date = a + b
print "difference: " + c.toText(xojo.core.locale.raw, xojo.core.date.formatStyles.full, xojo.core.date.formatStyles.full)[/code]
This shows:
difference: 2015-05-15 15:50:15
Change b.minutes = 45 then it shows:
difference: 2015-05-15 15:00:15 (did not wrap around to 16:00:15)
Can anybody confirm the above?
I can confirm your test on Windows 10. It works properly on OS X.
There is already a Feedback case for this:
<https://xojo.com/issue/39981>
[quote=215034:@Paul Lefebvre]I can confirm your test on Windows 10. It works properly on OS X.
There is already a Feedback case for this:
<https://xojo.com/issue/39981>[/quote]
Awesome… appreciate it, Paul.