New topic: Date Voodoo?
<http://forums.realsoftware.com/viewtopic.php?t=46165> Page 1 of 1 [ 3 posts ] Previous topic | Next topic Author Message JohnV Post subject: Date Voodoo?Posted: Thu Dec 06, 2012 11:54 pm Joined: Sun Jan 28, 2007 2:38 pm Posts: 144 Is this normal? Run this and tell me why the value of d get changed: dim d as new date d.Hour=0 d.Minute=0 d.Second=0 dim d1 as Date =d dim d2 as Date =d dim d3 as Date =d dim d4 as Date =d dim d5 as Date =d d1.day=d1.day-1 //d.date is going down? d2.day=d2.day-2 //d.date is going down? d3.day=d3.day-3 //d.date is going down? d4.day=d4.day-4 //d.date is going down? d5.day=d5.day-5 //d.date is going down? Top amitavak Post subject: Re: Date Voodoo?Posted: Fri Dec 07, 2012 12:51 am Joined: Mon Jan 02, 2012 1:51 am Posts: 377 Location: India All d, d1, d2, d3, d4, d5 point to same object. _________________ Amitava Karan Real Studio 2012 Release 1 Windows 7 (32 bit) Mac OS X Version 10.7 Top timhare Post subject: Re: Date Voodoo?Posted: Fri Dec 07, 2012 1:01 am Joined: Fri Jan 06, 2006 3:21 pm Posts: 11865 Location: Portland, OR USA Use the copy constructor dim d1 as new Date(d) dim d2 as new Date(d) etc. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 3 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
