What is the function to recognize 8 & 9 as "8" & "9"?
I am working with comparing dates. The problem I am having is that August (08) comes AFTER July (07). However, it seemed to consider Aug (08) and Sep (09) to be earlier than Jan-Jul. When I took a look at the values, they were shown as...
July = "07"
August = "00"
September = "00"
I remember a while back learning that the "default" number system used was the (Oct?) system...0-7 and that there was a function to tell it to recognize the number as coming from a decimal (1-10) system. I just cannot for the life of me remember what that function is.
I remember a while back learning that the "default" number system used was the (Oct?) system...0-7
The default system is decimal, but if you put a '0' in front of your number it is Octal. But you would need to do your assignments without the string operator for this to take effect.
If you're using parseInt to obtain 08 or 09's, You just have to set the redix (the numeral system) as 10 to get numbers in decimal system. Like this: parseInt(08,10). Bye!