-
What is the reasoning for get prefixes of functions that operate on dates? For example, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @ipavlic There are few reasons for having our current naming convention as is. |
Beta Was this translation helpful? Give feedback.
Hi @ipavlic
thank you for such an interesting question!
I have already responded to this in the issue you raised so I'll just do a copy-paste here.
There are few reasons for having our current naming convention as is.
We wanted to make our API as similar to the standard JS library as possible so both APIs could easily be used together.
When it comes to
getUnixTime
, it copies the convention from MDN JS Reference Date getTimeOne of the reasons for this naming convention is that its easier to maintain this huge amount of functions that we currently have: e.g.
its easier to implement mass changes (e.g. typescriptify) if all the functions of the same type have the same prefix hence
located to…