DrSchool Learn coding, fast.
EN AR BN CS DE EL Search

Date & Time — Example 169

Quick explanation + ready code for: Date & Time.

Ruby Date & Time Back to examples
Back to language
Syntax: Date & Time in Ruby. ID: #169

Code

const d = new Date();
console.log(d.toISOString());

Notes

You can copy this snippet and adapt it. For advanced, add real-world inputs, edge cases, and tests.