You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good job so far! The project looks good.
There is a couple of details, to follow the ES6 best practices we should use arrow functions. And as an optional observation, maybe you can take advantage of the luxon library to save some code and use:
const dt = DateTime.now(); document.getElementById('yourHTMLID').innerHTML = dt.toLocaleString(DateTime.DATETIME_MED);
This should give you the actual date in the required format.
Cheers!
The text was updated successfully, but these errors were encountered:
Actually, it will give you in the following format: 8 Nov 2022, 8:49 pm but based on the project requirements, we need to return the date and time in November 8th 2022, 8:51:2 PM See the image below:
Based on my research, luxon doesn't support putting st. nd, rd or th, I came across the following:
Good job so far! The project looks good.
There is a couple of details, to follow the ES6 best practices we should use arrow functions. And as an optional observation, maybe you can take advantage of the luxon library to save some code and use:
const dt = DateTime.now();
document.getElementById('yourHTMLID').innerHTML = dt.toLocaleString(DateTime.DATETIME_MED);
This should give you the actual date in the required format.
Cheers!
The text was updated successfully, but these errors were encountered: