Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:53 25 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MMBasic Date$ possible bug

Author Message
AndrewB
Newbie

Joined: 04/12/2011
Location: Australia
Posts: 15
Posted: 10:48pm 13 Feb 2012
Copy link to clipboard 
Print this post

Hello all,

I've just been testing a bit of code associated with timekeeping.

One test I have done is to set the date$ and time$ to just before midnight at various month ends and leap years and non-leap years, with the following results:

All non February months in leap years and non leap years roll over correctly from the end of one month to the next, updating the year as necessary.

February in a leap year rolls over from 29-02-YYYY to 30-02-YYYY, so I think this is a bug.

Should I submit this to the official support page?Edited by AndrewB 2012-02-15
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6098
Posted: 11:05pm 13 Feb 2012
Copy link to clipboard 
Print this post

I can confirm the bug in MM Basic V3.1

> date$="29/02/2012"
> time$="23:59:30"
> print date$;" ";time$
29-02-2012 23:59:56
> print date$;" ";time$
30-02-2012 00:00:16
> print mm.ver
3.01




Jim
VK7JH
MMedit   MMBasic Help
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 11:38pm 13 Feb 2012
Copy link to clipboard 
Print this post

Damn, I hate it when bugs turn up.
Thanks folks, I will fix it in 3.2 (but probably too late for this leap day).

Geoff
Geoff Graham - http://geoffg.net
 
djuqa

Guru

Joined: 23/11/2011
Location: Australia
Posts: 447
Posted: 11:46pm 13 Feb 2012
Copy link to clipboard 
Print this post

No RUSH then mate
Next leapyear not for 4 years LOL
VK4MU MicroController Units

 
AndrewB
Newbie

Joined: 04/12/2011
Location: Australia
Posts: 15
Posted: 11:50pm 13 Feb 2012
Copy link to clipboard 
Print this post

Yep, no problem - I'll check for it in my code and cope with it that way.

Cheers.
 
cosmic frog
Senior Member

Joined: 09/02/2012
Location: United Kingdom
Posts: 284
Posted: 10:06pm 14 Feb 2012
Copy link to clipboard 
Print this post

I think I may have also found a bug in the 'shorthand' Print statement.
Print @(10,10)"hello" = ok
? @(10,10)"hello" = error
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 10:38am 15 Feb 2012
Copy link to clipboard 
Print this post

Thanks, you have found another one.
Will be fixed in 3.2

Geoff
P.S Love the user name !!
Geoff Graham - http://geoffg.net
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024