Skip to content

Fixed typo in getDay() range - was 1-7 now 0-6#43781

Merged
hamishwillee merged 1 commit intomdn:mainfrom
coryannj:patch-1
Apr 17, 2026
Merged

Fixed typo in getDay() range - was 1-7 now 0-6#43781
hamishwillee merged 1 commit intomdn:mainfrom
coryannj:patch-1

Conversation

@coryannj
Copy link
Copy Markdown
Contributor

Description

getDay() range incorrectly mentioned as one-indexed (1-7) instead of zero-indexed (0-6)

Motivation

Fixing typo/incorrect content

Additional details

Change suggested based on getDay() docs:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getDay#:~:text=An%20integer%2C%20between%200%20and%206%2C%20representing%20the%20day%20of%20the%20week%20for%20the%20given%20date%20according%20to%20local%20time%3A%200%20for%20Sunday%2C%201%20for%20Monday%2C%202%20for%20Tuesday%2C%20and%20so%20on

Related issues and pull requests

@coryannj coryannj requested a review from a team as a code owner April 14, 2026 03:55
@coryannj coryannj requested review from hamishwillee and removed request for a team April 14, 2026 03:55
@github-actions github-actions bot added Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed labels Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Preview URLs (1 page)

Flaws (2)

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Web/API/IndexedDB_API/Checking_when_a_deadline_is_due
Title: Checking when a deadline is due
Flaw count: 2

  • macros:
    • Macro defaultapisidebar produces link /en-US/docs/Web/API/IndexedDB_API/Basic_Concepts_Behind_IndexedDB which is a redirect
    • Macro defaultapisidebar produces link /en-US/docs/Web/API/IndexedDB_API/Browser_storage_limits_and_eviction_criteria which is a redirect

Copy link
Copy Markdown
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

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

Thanks very much. Verified with

let current = new Date(); // Start at today
for (let i = 0; i < 7; i++) {
  // Increment the day by 1
  current.setDate(current.getDate() + 1);
  console.log(current.getDay());
}

... and congratulations on landing your first MDN PR!

@hamishwillee hamishwillee merged commit 0118259 into mdn:main Apr 17, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants