If you were considering purchasing a Biology text book, and spot read two chapters, what if you found the following?:
In the first chapter it claimed that most adult humans have 20 teeth.
In the second chapter you read that female humans have 22 chromosomes and male humans have 23.
You find these claims in the 24 pages you sample. Do you buy the book?
Companies are paying huge sums to AI companies with worse track records.
Would you put the book in your reference library if somebody gave it to you for free? Services like Google or DuckDuckGo put their AI-generated content at the top of search results with these inaccuracies.
[edit: replace paragraph that somehow got deleted, fix typo]
I mean... Yes? That looks correct to me°, but it's been a minute since I worked with Temporal, so I'd run it myself and examine the output before I cut and paste.
Or have I missed your point?
---
°Missing a TZ assertion, but I don't remember what happens by default. Zulu time? I'd hope so, but that reinforces my point.
I would also read the documentation. In the given example, for example, you don't know if the desired fixed format "YYYY-MM-DD" might depend on some locale setting and only works because you happen to have the correct one in that test console.
Part of my point is this: If you have to read through the docs to see if the answer can be trusted, why didn't you just read the docs to begin with instead of asking the AI?
It's just dawned on me that one possible reason is that you don't know which docs to read. I've recently been forced into learning some JavaScript. Given the original question I wouldn't have known where to start. Now the AI has given me a bunch of things I can look at to see if it's the right thing
If you didn't know enough to provide the original prompt, the AI sends you down the Date path instead of Temporal. But you could have used a 20 year-old search engine that would lead you to Javascript docs. You don't need error-riddled AI-generated code to find your way to the docs.
Are you saying there is more than one way to solve most problems in life? I don't believe it! Obviously, only what you personally like is the one true way. /s
Because you skip the step of finding out which docs to read. You get the specific functions and what parts of it you should check presented to you. Also, you only need to do this when it isn't already clear.
answer> Temporal.Instant.fromEpochSeconds(timestamp).toPlainDate()
Trust but verify?