3 ms·
Another oddity of JS's Date is that "Date()" returns a string whereas "new Date()" returns an object. This makes it hard to do "class MyDate extends Date" when
by leftyted 7y ago
Another oddity of JS's Date is that "Date()" returns a string whereas "new Date()" returns an object.
This makes it hard to do "class MyDate extends Date" when targeting ES5 from TS. In fact, if anyone knows an easy solution for that I'd love to hear it.
- why-oh-why 7y agoYour request is too broad, I suggest asking a question on StackOverflow explaining what the issue is exactly.
- leftyted 7y agoI didn't make a request. My post consists of two observations and an aside. Thanks for your wonderful feedback though.
- jessaustin 7y agoThat is the wrong way to fish for that "easy solution" on HN. The proper way is to confidently state that there is no easy solution, which may inspire the HN hive mind to contradict you. That probably won't work ITT however since I spoiled it by pointing this out.
- why-oh-why 7y ago> In fact, if anyone knows an easy solution for that I'd love to hear it. What’s this? You’re asking for a solution to “things that don’t work” ️