0

In JavaScript, when extracting time: What's the reason for the getFullYear, getMonth, getDay being singular but from getHours down the method title is plural? I know it doesn't really matter, but I keep on missing and adding 's' and understanding the reasoning behind it would help me to remember better.

Thanks in advance.

Gigi
  • 13
  • 4
  • 1
    I have no idea about the reason (which is likely lost to time), but I think you have already memorized it - day stuff plural, hour stuff singular. Also - I suggest using a good IDE which will give you auto-complete. That's way more useful than memorizing thousands of method names precisely. – Vilx- Aug 01 '21 at 10:44
  • 1
    https://stackoverflow.com/a/41992352/476 – deceze Aug 01 '21 at 11:13

0 Answers0