Skip to content

remove toUTC and add toTemporalInstant#294

Closed
Danieljeffery695 wants to merge 1 commit intosumn2u:mainfrom
Danieljeffery695:changing-toUTC-function-to-toTemporalInstant
Closed

remove toUTC and add toTemporalInstant#294
Danieljeffery695 wants to merge 1 commit intosumn2u:mainfrom
Danieljeffery695:changing-toUTC-function-to-toTemporalInstant

Conversation

@Danieljeffery695
Copy link
Copy Markdown
Contributor

@Danieljeffery695 Danieljeffery695 commented Aug 6, 2025

Please go through everything as I mentioned and feel free to give me your feedback. Thanks!!

@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
learn-javascript ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 6, 2025 2:44am

@sumn2u
Copy link
Copy Markdown
Owner

sumn2u commented Aug 6, 2025

Hi @Danieljeffery695, thanks for creating this PR. A small suggestion can we make the description little brief as like others?

Comment thread en/date-and-time.md
| `toUTCString()` | Converts date into a string according to the universal format |
| `toUTC()` | Returns the milliseconds since midnight Jan 1 1970 in UTC format |
| `valueOf()` | Returns the primitive value of `Date` |
| `toTemporalInstant()` | Returns a converted Date object to a Temporal.Instant, which represents a fixed point in time(down to nanoseconds, in UTC) KEY-TAKE: It does not contain any time zone or calendar information, making it suitable for representing a universal, unambiguous timestamp. NOTE: The Temporal method is not fully supported in all environment yet, so make sure your environment support it. |
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think of having a small description of this method? Maybe something like: "Returns a Date object converted to a Temporal.Instant, which represents a fixed point in time (down to nanoseconds, in UTC)."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I can do that.

@sumn2u
Copy link
Copy Markdown
Owner

sumn2u commented Aug 6, 2025

Closing this PR as the #295 covers the fixes.

@sumn2u sumn2u closed this Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants