Skip to content

Commit 3b2707c

Browse files
Nallamalli Venkata Sai Krishnaothree
authored andcommitted
updating Date() object methods
1 parent 20b53f1 commit 3b2707c

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

defs/ecmascript.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,6 +1010,11 @@
10101010
"!url": "https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toDateString",
10111011
"!doc": "Returns the date portion of a Date object in human readable form in American English."
10121012
},
1013+
"toGMTString": {
1014+
"!type": "fn() -> string",
1015+
"!url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toGMTString",
1016+
"!doc": "Returns a string representing the Date based on the GMT (UT) time zone."
1017+
},
10131018
"toTimeString": {
10141019
"!type": "fn() -> string",
10151020
"!url": "https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toTimeString",
@@ -1020,11 +1025,36 @@
10201025
"!url": "https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toLocaleDateString",
10211026
"!doc": "Converts a date to a string, returning the \"date\" portion using the operating system's locale's conventions."
10221027
},
1028+
"toLocaleFormat": {
1029+
"!type": "fn(formatString: string) -> string",
1030+
"!url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleFormat",
1031+
"!doc": "Converts a date to a string, using a format string."
1032+
},
1033+
"toLocaleString": {
1034+
"!type": "fn(locales?: string, options?: ?) -> string",
1035+
"!url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString",
1036+
"!doc": "Returns a string with a locality sensitive representation of this date."
1037+
},
10231038
"toLocaleTimeString": {
10241039
"!type": "fn() -> string",
10251040
"!url": "https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString",
10261041
"!doc": "Converts a date to a string, returning the \"time\" portion using the current locale's conventions."
10271042
},
1043+
"toSource": {
1044+
"!type": "fn() -> string",
1045+
"!url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toSource",
1046+
"!doc": "A string representing the source code of the given Date object."
1047+
},
1048+
"toString": {
1049+
"!type": "fn() -> string",
1050+
"!url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toString",
1051+
"!doc": "A string representing the given date."
1052+
},
1053+
"valueOf": {
1054+
"!type": "fn() -> number",
1055+
"!url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/valueOf",
1056+
"!doc": "Returns the primitive value of a Date object."
1057+
},
10281058
"getTime": {
10291059
"!type": "fn() -> number",
10301060
"!url": "https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getTime",
@@ -1070,6 +1100,11 @@
10701100
"!url": "https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getUTCDay",
10711101
"!doc": "Returns the day of the week in the specified date according to universal time."
10721102
},
1103+
"getUTCFullYear": {
1104+
"!type": "fn() -> number",
1105+
"!url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCFullYear",
1106+
"!doc": "The getUTCFullYear() method returns the year in the specified date according to universal time."
1107+
},
10731108
"getHours": {
10741109
"!type": "fn() -> number",
10751110
"!url": "https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getHours",
@@ -1130,6 +1165,11 @@
11301165
"!url": "https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setUTCFullYear",
11311166
"!doc": "Sets the full year for a specified date according to universal time."
11321167
},
1168+
"setYear": {
1169+
"!type": "fn(yearValue: number) -> number",
1170+
"!url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setYear",
1171+
"!doc": "Sets the year (usually 2-3 digits) for a specified date according to local time."
1172+
},
11331173
"setMonth": {
11341174
"!type": "fn(month: number) -> number",
11351175
"!url": "https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setMonth",

0 commit comments

Comments
 (0)