4 ms·
> Just look at time and floating point numbers in Java What do you mean? The time & date API in Java is excellent, and the float and double types follow the IE
by MrBuddyCasino 2y ago
> Just look at time and floating point numbers in Java
What do you mean? The time & date API in Java is excellent, and the float and double types follow the IEEE standard.
- badlibrarian 2y agoIt took nearly 20 years to sort it out. Before Java 8, January was 0 and getYear() for today would return 125.
- stefanfisk 2y agoWasn’t Java 8 released 11 years ago? If PHP had been in its current state back then it would have been a masterpiece.
- IshKebab 2y agoJanuary as 0 seems like a very definsible choice. Presumably they did it to match C. If anything the WTF there is that the day of the month doesn't start from 0. Dunno what's up with getYear() though!
- divbzero 2y agogetYear() must have been written in the 1990s during the early years of Java: 95 = 1995 96 = 1996 97 = 1997 98 = 1998 99 = 1999 100 = 2000 !?