If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Time Primitive - Month Error
4 posts
• Page 1 of 1
Time Primitive - Month Error
NOTE:
The Time Primitive display at its output terminal that the Month January begin at Index 0, but in fact its output terminal produces a numeral 1 for the Index of January.
Therefore, if you construct your Month Array with Jan, Feb, Mar, Apr, May...then the String GetAt will never find January which is in fact at Index 0 in the array, whilst the Index from the Time Primitive output terminal is a numeral 1 for January...thus, all the Months will be 1 Month ahead of time with respect to the Array Index.
You will therefore have to take this into account and make the necessary correction between Time Primitive output terminal and the String GetAt Input Index terminal - see attached Schematic.
The Time Primitive display at its output terminal that the Month January begin at Index 0, but in fact its output terminal produces a numeral 1 for the Index of January.
Therefore, if you construct your Month Array with Jan, Feb, Mar, Apr, May...then the String GetAt will never find January which is in fact at Index 0 in the array, whilst the Index from the Time Primitive output terminal is a numeral 1 for January...thus, all the Months will be 1 Month ahead of time with respect to the Array Index.
You will therefore have to take this into account and make the necessary correction between Time Primitive output terminal and the String GetAt Input Index terminal - see attached Schematic.
- Attachments
-
- Time Module (Error Correction).fsm
- (1.34 KiB) Downloaded 850 times
-
tiffy - Posts: 400
- Joined: Wed May 08, 2013 12:14 pm
Re: Time Primitive - Month Error
Hey thanks for the heads up on that one Tiffy!
Cheers
Spogg
Cheers
Spogg
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Time Primitive - Month Error
Interesting find Tiffy.
For my last project, I used RUBY
I just check it ... was correct.
still ... thanks for the heads-up correction.
For my last project, I used RUBY
- Code: Select all
Time.now.strftime("%b")
I just check it ... was correct.
still ... thanks for the heads-up correction.
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: Time Primitive - Month Error
i'm sure its intended to be 1-12 which is logical when using just numbers to show the date, like this you can use the output without any correction.
anyways the descriptions on the module needs to be corrected.
anyways the descriptions on the module needs to be corrected.
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 32 guests