Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs: Clarify documentation of input[week] #16104

Merged
merged 2 commits into from
Jul 13, 2017
Merged

docs: Clarify documentation of input[week] #16104

merged 2 commits into from
Jul 13, 2017

Conversation

SteveAndrewArcher
Copy link
Contributor

Add a note to documentation of input[week] to explicitly state that the
resulting Date object's value is set to Thursday at midnight of the
specified week

Resolves #15883

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

docs update

What is the current behavior? (You can also link to an open issue here)

#15883
The docs do not specify the day and time of a Date created by input[week]

What is the new behavior (if this is a feature change)?

The docs now explicitly state that the resulting Date object's value is set to Thursday at midnight of the
specified week

Does this PR introduce a breaking change?

No

Please check if the PR fulfills these requirements

Other information:
Thought this looked like a nice opportunity for baby's first pull request! Hope I did everything right...

Add a note to documentation of input[week] to explicitly state that the
resulting Date object's value is set to Thursday at midnight of the
specified week

Resolves #15883
Copy link
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

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

One minor suggestion. LGTM otherwise.
Thx for taking this on 👍

@@ -457,6 +457,9 @@ var inputType = {
* The model must always be a Date object, otherwise AngularJS will throw an error.
* Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.
*
* The value of the resulting Date object will be set to Thursday at 00:00:00 of the requested week,
* due to ISO-8601 week numbering standards.
Copy link
Member

Choose a reason for hiding this comment

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

Looks good. Can you please also add a link to https://en.wikipedia.org/wiki/ISO_8601#Week_dates?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, should have thought of that. Will do!

Add a note to documentation of input[week] to explicitly state that the
resulting Data object's value is set to Thursday at midnight of the
specified week, and add a link to explain ISO's week numbering system

Resolves #15883
@Narretz Narretz merged commit 7e97db9 into angular:master Jul 13, 2017
@SteveAndrewArcher SteveAndrewArcher deleted the week-input-doc-change-branch branch July 14, 2017 18:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation for input[week] doesn't mention what will be the underlying Date object
4 participants