Skip to content

Commit cc0c9fa

Browse files
docs: update hints
1 parent 186c05a commit cc0c9fa

File tree

1 file changed

+2
-1
lines changed
  • exercises/concept/appointment-time/.docs

1 file changed

+2
-1
lines changed

exercises/concept/appointment-time/.docs/hints.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
- You need to create a new date. The introduction elaborates on the different ways.
66
- `Date.now()` gives you current time in milliseconds
7-
- A day consist of 24 hour. An hour consist of 60 minutes. A minute consist of 60 seconds. A second consist of 1000 milliseconds. In order to get timestamp of `n` days later from current date, you can sum current timestamp and `n * 24 * 60 * 60 * 1000`.
7+
- `Date` has several getter methods to get date components - months, hours, etc. - for a given date. `getMinutes`, for instance, returns the minutes component.
8+
- Likewise, `Date` has several setter methods to set those components, rolling over into "higher" components if needed. `setMinutes(80)`, for example, will increase the hours component by one and set the minutes component to 20.
89

910
## 2. Convert a date into a timestamp
1011

0 commit comments

Comments
 (0)