Hacker News new | past | comments | ask | show | jobs | submit login

> 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.






It took nearly 20 years to sort it out. Before Java 8, January was 0 and getYear() for today would return 125.

January 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!


getYear() 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 !?

Wasn’t Java 8 released 11 years ago? If PHP had been in its current state back then it would have been a masterpiece.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: