Skip to content

Commit 7e97db9

Browse files
SteveAndrewArcherNarretz
authored andcommitted
docs(input[week]): clarify value of Date object
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 angular#15883 Closes angular#16104
1 parent 6a22c79 commit 7e97db9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ng/directive/input.js

+4
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,10 @@ var inputType = {
457457
* The model must always be a Date object, otherwise AngularJS will throw an error.
458458
* Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.
459459
*
460+
* The value of the resulting Date object will be set to Thursday at 00:00:00 of the requested week,
461+
* due to ISO-8601 week numbering standards. Information on ISO's system for numbering the weeks of the
462+
* year can be found at: https://en.wikipedia.org/wiki/ISO_8601#Week_dates
463+
*
460464
* The timezone to be used to read/write the `Date` instance in the model can be defined using
461465
* {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.
462466
*

0 commit comments

Comments
 (0)