Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Date and time #3346

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bogdanbacosca wants to merge 22 commits into javascript-tutorial:master
base: master
Choose a base branch
Loading
from bogdanbacosca:date
Open

Conversation

@bogdanbacosca
Copy link
Contributor

@bogdanbacosca bogdanbacosca commented Jan 31, 2023

Line 34 - There is no variable named date prior to this mention. We could keep .getTime( ) as is, or use the variable now or Jan01_1970.
line 57 - Though date is used in some docs, day makes more sense and I also saw day in MDN. P.S this is just modified in one place: if agreed, will have to change this in multiple places.
line 61 - grammar fix
line 62 - replaced is actually the day of with represents the day of. I swapped date with day ahead of time, we can ignore that if line 57 does not change.
line 69 - typo
line 108 - replaced shifted with offset
line 167 - grammar fix
line 244 - took out in JavaScript because it is implicit and may improve readability.
line 377 - suggestion
line 390 - modified by the same logic(format) of line 388
line 402 - extra space
line 415 - took out in JavaScript because it is implicit and may improve readability.
line 416 - suggestion
line 424 - returns may be more accurate
Tasks 2 and 3 - formatting improvements
Tasks 7 and 8 - some improvements

There is no variable named date prior to this mention. We could keep `.getTime( )` as is, or use the variable `now` or `Jan01_1970`.
According to MDN and some other docs, the term day is used. I did not check the specification, but day would be a more accurate description.
modified by the same logic of line 388
```

`new Date(year, month, date, hours, minutes, seconds, ms)`
`new Date(year, month, day, hours, minutes, seconds, ms)`
Copy link
Contributor

@JeraldVin JeraldVin Feb 7, 2023

Choose a reason for hiding this comment

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

would date be more clear? Since new Date().getDay() returns the number of the weekday? 🤔

Co-authored-by: Jerald Vinfrank <46400789+JeraldVin@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@JeraldVin JeraldVin JeraldVin left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /