36#define TIME_EPOCH ((ULONGLONG)(369 * 365 + 89) * 86400 * 1000)
52static const WCHAR toLocaleStringW[] = {
't',
'o',
'L',
'o',
'c',
'a',
'l',
'e',
'S',
't',
'r',
'i',
'n',
'g',0};
54static const WCHAR toISOStringW[] = {
't',
'o',
'I',
'S',
'O',
'S',
't',
'r',
'i',
'n',
'g',0};
55static const WCHAR toUTCStringW[] = {
't',
'o',
'U',
'T',
'C',
'S',
't',
'r',
'i',
'n',
'g',0};
56static const WCHAR toGMTStringW[] = {
't',
'o',
'G',
'M',
'T',
'S',
't',
'r',
'i',
'n',
'g',0};
57static const WCHAR toDateStringW[] = {
't',
'o',
'D',
'a',
't',
'e',
'S',
't',
'r',
'i',
'n',
'g',0};
58static const WCHAR toTimeStringW[] = {
't',
'o',
'T',
'i',
'm',
'e',
'S',
't',
'r',
'i',
'n',
'g',0};
59static const WCHAR toLocaleDateStringW[] = {
't',
'o',
'L',
'o',
'c',
'a',
'l',
'e',
'D',
'a',
't',
'e',
'S',
't',
'r',
'i',
'n',
'g',0};
60static const WCHAR toLocaleTimeStringW[] = {
't',
'o',
'L',
'o',
'c',
'a',
'l',
'e',
'T',
'i',
'm',
'e',
'S',
't',
'r',
'i',
'n',
'g',0};
62static const WCHAR getFullYearW[] = {
'g',
'e',
't',
'F',
'u',
'l',
'l',
'Y',
'e',
'a',
'r',0};
63static const WCHAR getUTCFullYearW[] = {
'g',
'e',
't',
'U',
'T',
'C',
'F',
'u',
'l',
'l',
'Y',
'e',
'a',
'r',0};
65static const WCHAR getUTCMonthW[] = {
'g',
'e',
't',
'U',
'T',
'C',
'M',
'o',
'n',
't',
'h',0};
67static const WCHAR getUTCDateW[] = {
'g',
'e',
't',
'U',
'T',
'C',
'D',
'a',
't',
'e',0};
71static const WCHAR getUTCHoursW[] = {
'g',
'e',
't',
'U',
'T',
'C',
'H',
'o',
'u',
'r',
's',0};
72static const WCHAR getMinutesW[] = {
'g',
'e',
't',
'M',
'i',
'n',
'u',
't',
'e',
's',0};
73static const WCHAR getUTCMinutesW[] = {
'g',
'e',
't',
'U',
'T',
'C',
'M',
'i',
'n',
'u',
't',
'e',
's',0};
74static const WCHAR getSecondsW[] = {
'g',
'e',
't',
'S',
'e',
'c',
'o',
'n',
'd',
's',0};
75static const WCHAR getUTCSecondsW[] = {
'g',
'e',
't',
'U',
'T',
'C',
'S',
'e',
'c',
'o',
'n',
'd',
's',0};
76static const WCHAR getMillisecondsW[] = {
'g',
'e',
't',
'M',
'i',
'l',
'l',
'i',
's',
'e',
'c',
'o',
'n',
'd',
's',0};
77static const WCHAR getUTCMillisecondsW[] = {
'g',
'e',
't',
'U',
'T',
'C',
'M',
'i',
'l',
'l',
'i',
's',
'e',
'c',
'o',
'n',
'd',
's',0};
78static const WCHAR getTimezoneOffsetW[] = {
'g',
'e',
't',
'T',
'i',
'm',
'e',
'z',
'o',
'n',
'e',
'O',
'f',
'f',
's',
'e',
't',0};
80static const WCHAR setMillisecondsW[] = {
's',
'e',
't',
'M',
'i',
'l',
'l',
'i',
's',
'e',
'c',
'o',
'n',
'd',
's',0};
81static const WCHAR setUTCMillisecondsW[] = {
's',
'e',
't',
'U',
'T',
'C',
'M',
'i',
'l',
'l',
'i',
's',
'e',
'c',
'o',
'n',
'd',
's',0};
82static const WCHAR setSecondsW[] = {
's',
'e',
't',
'S',
'e',
'c',
'o',
'n',
'd',
's',0};
83static const WCHAR setUTCSecondsW[] = {
's',
'e',
't',
'U',
'T',
'C',
'S',
'e',
'c',
'o',
'n',
'd',
's',0};
84static const WCHAR setMinutesW[] = {
's',
'e',
't',
'M',
'i',
'n',
'u',
't',
'e',
's',0};
85static const WCHAR setUTCMinutesW[] = {
's',
'e',
't',
'U',
'T',
'C',
'M',
'i',
'n',
'u',
't',
'e',
's',0};
87static const WCHAR setUTCHoursW[] = {
's',
'e',
't',
'U',
'T',
'C',
'H',
'o',
'u',
'r',
's',0};
89static const WCHAR setUTCDateW[] = {
's',
'e',
't',
'U',
'T',
'C',
'D',
'a',
't',
'e',0};
91static const WCHAR setUTCMonthW[] = {
's',
'e',
't',
'U',
'T',
'C',
'M',
'o',
'n',
't',
'h',0};
92static const WCHAR setFullYearW[] = {
's',
'e',
't',
'F',
'u',
'l',
'l',
'Y',
'e',
'a',
'r',0};
93static const WCHAR setUTCFullYearW[] = {
's',
'e',
't',
'U',
'T',
'C',
'F',
'u',
'l',
'l',
'Y',
'e',
'a',
'r',0};
112#define MS_PER_DAY 86400000
113#define MS_PER_HOUR 3600000
114#define MS_PER_MINUTE 60000
139 if(year != (
int)year)
143 if(
y%4 != 0)
return 365;
144 if(
y%100 != 0)
return 366;
145 if(
y%400 != 0)
return 365;
152 if(year != (
int)year)
155 return floor(365.0*(year-1970) +
floor((year-1969)/4)
156 -
floor((year-1901)/100) +
floor((year-1601)/400));
237 if(0<=dwy && dwy<31)
return 0;
238 if(dwy < 59+ily)
return 1;
239 if(dwy < 90+ily)
return 2;
240 if(dwy < 120+ily)
return 3;
241 if(dwy < 151+ily)
return 4;
242 if(dwy < 181+ily)
return 5;
243 if(dwy < 212+ily)
return 6;
244 if(dwy < 243+ily)
return 7;
245 if(dwy < 273+ily)
return 8;
246 if(dwy < 304+ily)
return 9;
247 if(dwy < 334+ily)
return 10;
261 if(mft==0)
return dwy+1;
262 if(mft==1)
return dwy-30;
263 if(mft==2)
return dwy-58-ily;
264 if(mft==3)
return dwy-89-ily;
265 if(mft==4)
return dwy-119-ily;
266 if(mft==5)
return dwy-150-ily;
267 if(mft==6)
return dwy-180-ily;
268 if(mft==7)
return dwy-211-ily;
269 if(mft==8)
return dwy-242-ily;
270 if(mft==9)
return dwy-272-ily;
271 if(mft==10)
return dwy-303-ily;
326 DOUBLE standardTime, daylightTime;
334 if(
isnan(standardTime) ||
isnan(daylightTime))
336 else if(standardTime > daylightTime) {
337 if(daylightTime <=
time &&
time < standardTime)
338 return date->daylightBias;
340 return date->standardBias;
343 if(standardTime <=
time &&
time < daylightTime)
344 return date->standardBias;
346 return date->daylightBias;
452 if(8.64e15 <
time ||
time < -8.64e15) {
488 static const WCHAR formatW[] = {
'%',
's',
' ',
'%',
's',
' ',
'%',
'd',
' ',
489 '%',
'0',
'2',
'd',
':',
'%',
'0',
'2',
'd',
':',
'%',
'0',
'2',
'd',
' ',
490 'U',
'T',
'C',
'%',
'c',
'%',
'0',
'2',
'd',
'%',
'0',
'2',
'd',
' ',
'%',
'd',
'%',
's',0 };
491 static const WCHAR formatUTCW[] = {
'%',
's',
' ',
'%',
's',
' ',
'%',
'd',
' ',
492 '%',
'0',
'2',
'd',
':',
'%',
'0',
'2',
'd',
':',
'%',
'0',
'2',
'd',
' ',
493 'U',
'T',
'C',
' ',
'%',
'd',
'%',
's',0 };
494 static const WCHAR formatNoOffsetW[] = {
'%',
's',
' ',
'%',
's',
' ',
495 '%',
'd',
' ',
'%',
'0',
'2',
'd',
':',
'%',
'0',
'2',
'd',
':',
496 '%',
'0',
'2',
'd',
' ',
'%',
'd',
'%',
's',0 };
497 static const WCHAR ADW[] = { 0 };
498 static const WCHAR BCW[] = {
' ',
'B',
'.',
'C',
'.',0 };
554 year, formatAD?ADW:BCW);
601 int date_len, time_len;
631 ptr[date_len-1] =
' ';
645 static const WCHAR short_year_formatW[] = {
'%',
'0',
'4',
'd',0};
646 static const WCHAR long_year_formatW[] = {
'%',
'0',
'6',
'd',0};
647 static const WCHAR formatW[] = {
'-',
'%',
'0',
'2',
'd',
'-',
'%',
'0',
'2',
'd',
648 'T',
'%',
'0',
'2',
'd',
':',
'%',
'0',
'2',
'd',
':',
'%',
'0',
'2',
'd',
'.',
'%',
'0',
'3',
'd',
'Z',0};
656 if(
isnan(year) || year > 999999 || year < -999999) {
657 FIXME(
"year %lf should throw an exception\n", year);
663 p +=
swprintf(
p, long_year_formatW, -(
int)year);
664 }
else if(year > 9999) {
666 p +=
swprintf(
p, long_year_formatW, (
int)year);
668 p +=
swprintf(
p, short_year_formatW, (
int)year);
702 static const WCHAR formatADW[] = {
'%',
's',
',',
' ',
'%',
'd',
' ',
'%',
's',
' ',
'%',
'd',
' ',
703 '%',
'0',
'2',
'd',
':',
'%',
'0',
'2',
'd',
':',
'%',
'0',
'2',
'd',
' ',
'U',
'T',
'C',0 };
704 static const WCHAR formatBCW[] = {
'%',
's',
',',
' ',
'%',
'd',
' ',
'%',
's',
' ',
'%',
'd',
' ',
'B',
'.',
'C',
'.',
' ',
705 '%',
'0',
'2',
'd',
':',
'%',
'0',
'2',
'd',
':',
'%',
'0',
'2',
'd',
' ',
'U',
'T',
'C',0 };
782 static const WCHAR formatADW[] = {
'%',
's',
' ',
'%',
's',
' ',
'%',
'd',
' ',
'%',
'd',0 };
783 static const WCHAR formatBCW[] = {
'%',
's',
' ',
'%',
's',
' ',
'%',
'd',
' ',
'%',
'd',
' ',
'B',
'.',
'C',
'.',0 };
854 static const WCHAR formatW[] = {
'%',
'0',
'2',
'd',
':',
'%',
'0',
'2',
'd',
':',
'%',
'0',
'2',
'd',
855 ' ',
'U',
'T',
'C',
'%',
'c',
'%',
'0',
'2',
'd',
'%',
'0',
'2',
'd',0 };
856 static const WCHAR formatUTCW[] = {
'%',
'0',
'2',
'd',
':',
'%',
'0',
'2',
'd',
857 ':',
'%',
'0',
'2',
'd',
' ',
'U',
'T',
'C',0 };
1441 double t,
min, sec, ms;
1488 double t,
min, sec, ms;
1535 double t, hour,
min, sec, ms;
1589 double t, hour,
min, sec, ms;
1779 double t, year,
month, ddate;
1825 double t, year,
month, ddate;
1887 *
r =
jsval_number((1900<=year && year<2000)?year-1900:year);
1920 year = year >= 0.0 ?
floor(year) : -
floor(-year);
1921 if(-1.0 < year && year < 100.0)
2015 if(object_prototype)
2045 int input_len, parse_len = 0, nest_level = 0,
i,
size;
2046 int year = 0,
month = 0,
day = 0, hour = 0,
min = 0, sec = 0;
2047 int ms = 0,
offset = 0, hour_adjust = 0;
2061 for(
i=0;
i<input_len;
i++) {
2062 if(
input[
i] ==
'(') nest_level++;
2063 else if(
input[
i] ==
')') {
2070 else if(!nest_level) parse_len++;
2078 for(
i=0;
i<input_len;
i++) {
2079 if(
input[
i] ==
'(') nest_level++;
2080 else if(
input[
i] ==
')') nest_level--;
2083 parse[parse_len] = 0;
2107 for(
i=0;
i<parse_len;) {
2109 if(parse[
i] ==
',') {
2110 while(parse[
i] ==
',')
i++;
2114 if(parse[
i]>=
'0' && parse[
i]<=
'9') {
2116 while(parse[
i]>=
'0' && parse[
i]<=
'9')
i++;
2119 if(parse[
i] ==
':') {
2126 while(parse[
i] ==
':')
i++;
2128 if(parse[
i]>=
'0' && parse[
i]<=
'9') {
2130 while(parse[
i]>=
'0' && parse[
i]<=
'9')
i++;
2134 while(parse[
i] ==
':')
i++;
2136 if(parse[
i]>=
'0' && parse[
i]<=
'9') {
2138 while(parse[
i]>=
'0' && parse[
i]<=
'9')
i++;
2141 else if(parse[
i]==
'-' || parse[
i]==
'/') {
2143 if(set_day || set_month || set_year)
break;
2151 while(parse[
i]==
'-' || parse[
i]==
'/')
i++;
2153 if(parse[
i]<
'0' || parse[
i]>
'9')
break;
2155 while(parse[
i]>=
'0' && parse[
i]<=
'9')
i++;
2157 while(parse[
i]==
'-' || parse[
i]==
'/')
i++;
2159 if(parse[
i]<
'0' || parse[
i]>
'9')
break;
2161 while(parse[
i]>=
'0' && parse[
i]<=
'9')
i++;
2170 else if(tmp<0)
break;
2184 else if(parse[
i]==
'+' || parse[
i]==
'-') {
2188 if(set_offset && set_hour_adjust)
break;
2190 set_hour_adjust =
FALSE;
2196 if(parse[
i]<
'0' || parse[
i]>
'9')
break;
2198 while(parse[
i]>=
'0' && parse[
i]<=
'9')
i++;
2207 if(parse[
i]<
'A' || parse[
i]>
'Z')
break;
2208 else if(parse[
i]==
'B' && (parse[
i+1]==
'C' ||
2209 (parse[
i+1]==
'.' && parse[
i+2]==
'C'))) {
2216 if(parse[
i] ==
'.')
i++;
2218 if(parse[
i] ==
'.')
i++;
2220 else if(parse[
i]==
'A' && (parse[
i+1]==
'D' ||
2221 (parse[
i+1]==
'.' && parse[
i+2]==
'D'))) {
2227 if(parse[
i] ==
'.')
i++;
2229 if(parse[
i] ==
'.')
i++;
2231 else if(parse[
i+1]<
'A' || parse[
i+1]>
'Z') {
2233 if(set_offset)
break;
2236 if(parse[
i] <=
'I') hour_adjust = parse[
i]-
'A'+2;
2237 else if(parse[
i] ==
'J')
break;
2238 else if(parse[
i] <=
'M') hour_adjust = parse[
i]-
'K'+11;
2239 else if(parse[
i] <=
'Y') hour_adjust = parse[
i]-
'N';
2240 else hour_adjust = 1;
2243 if(parse[
i] ==
'.')
i++;
2245 else if(parse[
i]==
'A' && parse[
i+1]==
'M') {
2252 else if(parse[
i]==
'P' && parse[
i+1]==
'M') {
2259 else if((parse[
i]==
'U' && parse[
i+1]==
'T' && parse[
i+2]==
'C')
2260 || (parse[
i]==
'G' && parse[
i+1]==
'M' && parse[
i+2]==
'T')) {
2262 if(set_offset)
break;
2264 set_hour_adjust =
FALSE;
2279 if(set_month)
break;
2290 if(
i == parse_len && set_year && set_month && set_day && (!set_am || hour<13)) {
2292 if(hour == 12) hour = 0;
2296 if(!ad) year = -year+1;
2297 else if(year<100) year += 1900;
2345 double year,
month, vdate, hours, minutes, seconds, ms;
2354 if(0 <= year && year <= 99)
2409 make_time(hours, minutes,seconds, ms)));
2445 case DISPATCH_CONSTRUCT:
2539 static const WCHAR DateW[] = {
'D',
'a',
't',
'e',0};
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static HRESULT Date_getDate(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR UTCW[]
static HRESULT Date_getUTCFullYear(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR setTimeW[]
static const WCHAR getSecondsW[]
static const builtin_prop_t DateConstr_props[]
static HRESULT dateobj_to_string(DateInstance *date, jsval_t *r)
static const builtin_info_t Date_info
static HRESULT Date_setUTCFullYear(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_toUTCString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
HRESULT create_date_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp_t **ret)
static const WCHAR toTimeStringW[]
static DOUBLE utc(DOUBLE time, DateInstance *date)
static HRESULT Date_getFullYear(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR toLocaleDateStringW[]
static const WCHAR getDayW[]
static DOUBLE min_from_time(DOUBLE time)
static HRESULT Date_getUTCMilliseconds(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT DateConstr_parse(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR setUTCHoursW[]
static HRESULT Date_getUTCMinutes(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR getYearW[]
static const WCHAR getMinutesW[]
static HRESULT Date_getUTCMonth(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR setMinutesW[]
static const WCHAR valueOfW[]
static const builtin_info_t DateInst_info
static const WCHAR getTimeW[]
static const WCHAR setUTCSecondsW[]
static const WCHAR setFullYearW[]
static DOUBLE days_in_year(DOUBLE year)
static HRESULT Date_getMonth(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR getUTCMonthW[]
static DOUBLE make_date(DOUBLE day, DOUBLE time)
static HRESULT Date_toGMTString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_getUTCDate(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static int in_leap_year(DOUBLE time)
static HRESULT Date_getTimezoneOffset(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const builtin_info_t DateConstr_info
static const WCHAR getMonthW[]
static DOUBLE make_day(DOUBLE year, DOUBLE month, DOUBLE day)
static const WCHAR toISOStringW[]
static HRESULT Date_getUTCHours(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_setYear(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_setTime(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR getFullYearW[]
static HRESULT Date_setSeconds(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static DOUBLE time_from_year(DOUBLE year)
static const WCHAR toLocaleTimeStringW[]
static const WCHAR setDateW[]
static const WCHAR setUTCFullYearW[]
static DateInstance * date_from_jsdisp(jsdisp_t *jsdisp)
static HRESULT Date_setUTCHours(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR getUTCDateW[]
static HRESULT Date_toTimeString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR parseW[]
static HRESULT Date_getUTCSeconds(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT dateobj_to_date_string(DateInstance *date, jsval_t *r)
static DOUBLE day_from_year(DOUBLE year)
static HRESULT DateConstr_now(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static int day_within_year(DOUBLE time)
static HRESULT Date_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static DOUBLE local_time(DOUBLE time, DateInstance *date)
static const WCHAR getUTCMinutesW[]
static DOUBLE month_from_time(DOUBLE time)
static const WCHAR getUTCSecondsW[]
static HRESULT Date_valueOf(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static DOUBLE time_clip(DOUBLE time)
static HRESULT Date_setMinutes(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_setUTCMinutes(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_getSeconds(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_getMilliseconds(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR setHoursW[]
static DOUBLE convert_time(int year, SYSTEMTIME st)
static HRESULT Date_getYear(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR toLocaleStringW[]
static HRESULT Date_toLocaleDateString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_setUTCDate(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR getHoursW[]
static const WCHAR setSecondsW[]
static HRESULT Date_getHours(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_toISOString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR getUTCFullYearW[]
static SYSTEMTIME create_systemtime(DOUBLE time)
static const WCHAR getUTCDayW[]
static HRESULT Date_setFullYear(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT DateConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static DOUBLE daylight_saving_ta(DOUBLE time, DateInstance *date)
static HRESULT Date_toDateString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR getUTCMillisecondsW[]
static const builtin_prop_t Date_props[]
static HRESULT DateConstr_UTC(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_setHours(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR toGMTStringW[]
static const WCHAR getTimezoneOffsetW[]
static const WCHAR setUTCDateW[]
static const WCHAR setMonthW[]
static HRESULT date_utc(script_ctx_t *ctx, unsigned argc, jsval_t *argv, double *ret)
static const WCHAR toStringW[]
static const WCHAR setUTCMinutesW[]
static const WCHAR setYearW[]
static DOUBLE date_from_time(DOUBLE time)
static const WCHAR nowW[]
static HRESULT Date_setUTCSeconds(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT create_utc_string(script_ctx_t *ctx, vdisp_t *jsthis, jsval_t *r)
static HRESULT Date_getTime(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static DOUBLE hour_from_time(DOUBLE time)
static HRESULT date_to_string(DOUBLE time, BOOL show_offset, int offset, jsval_t *r)
static HRESULT date_parse(jsstr_t *input_str, double *ret)
static HRESULT Date_getMinutes(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static DOUBLE ms_from_time(DOUBLE time)
static HRESULT Date_getUTCDay(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static DOUBLE sec_from_time(DOUBLE time)
static HRESULT create_date(script_ctx_t *ctx, jsdisp_t *object_prototype, DOUBLE time, jsdisp_t **ret)
static DOUBLE week_day(DOUBLE time)
static DOUBLE time_within_day(DOUBLE time)
static HRESULT Date_setDate(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR getMillisecondsW[]
static DOUBLE make_time(DOUBLE hour, DOUBLE min, DOUBLE sec, DOUBLE ms)
static DOUBLE year_from_time(DOUBLE time)
static const WCHAR setUTCMillisecondsW[]
static const WCHAR getDateW[]
static DateInstance * date_this(vdisp_t *jsthis)
static const WCHAR toUTCStringW[]
static double date_now(void)
static HRESULT Date_setUTCMonth(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_toLocaleTimeString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR setMillisecondsW[]
static const WCHAR toDateStringW[]
static HRESULT Date_getDay(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static DOUBLE day(DOUBLE time)
static HRESULT Date_setMonth(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_setUTCMilliseconds(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_toLocaleString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR setUTCMonthW[]
static const WCHAR getUTCHoursW[]
static HRESULT Date_get_value(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT Date_setMilliseconds(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static int day_from_month(int month, int in_leap_year)
HRESULT throw_type_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str)
HRESULT create_builtin_constructor(script_ctx_t *ctx, builtin_invoke_t value_proc, const WCHAR *name, const builtin_info_t *builtin_info, DWORD flags, jsdisp_t *prototype, jsdisp_t **ret)
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
BOOL WINAPI FileTimeToLocalFileTime(IN CONST FILETIME *lpFileTime, OUT LPFILETIME lpLocalFileTime)
DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION lpTimeZoneInformation)
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
static const WCHAR month[12][4]
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble r
GLsizei const GLchar *const * strings
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLenum GLenum input
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
static HRESULT to_string(VARIANT *src, BSTR *dst)
_Check_return_ double __cdecl fmod(_In_ double x, _In_ double y)
_Check_return_ _CRTIMP double __cdecl floor(_In_ double x)
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
HRESULT init_dispex_from_constr(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *constr)
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
static const WCHAR DateW[]
static BOOL is_vclass(vdisp_t *vdisp, jsclass_t class)
#define DEFAULT_FUNCTION_VALUE
static void jsdisp_release(jsdisp_t *jsdisp)
HRESULT to_primitive(script_ctx_t *, jsval_t, jsval_t *, hint_t) DECLSPEC_HIDDEN
HRESULT to_number(script_ctx_t *, jsval_t, double *) DECLSPEC_HIDDEN
#define JS_E_DATE_EXPECTED
jsstr_t * jsstr_nan(void)
jsstr_t * jsstr_alloc_buf(unsigned len, WCHAR **buf)
static const WCHAR * jsstr_flatten(jsstr_t *str)
static void jsstr_release(jsstr_t *str)
static unsigned jsstr_length(jsstr_t *str)
static jsstr_t * jsstr_alloc(const WCHAR *str)
void jsval_release(jsval_t val)
static jsval_t jsval_string(jsstr_t *str)
static jsval_t jsval_obj(jsdisp_t *obj)
static jsstr_t * get_string(jsval_t v)
static jsval_t jsval_number(double n)
#define MAKELCID(lgid, srtid)
static BOOL is_string(parse_buffer *buf)
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
#define SUBLANG_ENGLISH_US
__CRT_INLINE void __cdecl ftime(struct timeb *_Tmb)
#define CONTAINING_RECORD(address, type, field)
#define LOCALE_SABBREVMONTHNAME10
#define LOCALE_SMONTHNAME12
#define LOCALE_SMONTHNAME5
#define LOCALE_SABBREVMONTHNAME9
#define LOCALE_SABBREVMONTHNAME11
#define LOCALE_SABBREVDAYNAME5
#define LOCALE_SABBREVDAYNAME2
#define LOCALE_SABBREVMONTHNAME2
#define LOCALE_SMONTHNAME3
#define LOCALE_SMONTHNAME11
#define LOCALE_SMONTHNAME8
#define LOCALE_SMONTHNAME4
#define LOCALE_SMONTHNAME7
#define LOCALE_SABBREVMONTHNAME4
#define LOCALE_SABBREVDAYNAME4
#define LOCALE_SMONTHNAME1
#define LOCALE_SABBREVMONTHNAME3
#define LOCALE_SABBREVMONTHNAME1
#define LOCALE_SABBREVDAYNAME6
#define LOCALE_SMONTHNAME2
#define LOCALE_SABBREVDAYNAME1
#define LOCALE_SABBREVMONTHNAME6
#define LOCALE_SMONTHNAME6
#define LOCALE_SABBREVDAYNAME3
#define LOCALE_SABBREVMONTHNAME5
#define LOCALE_SABBREVMONTHNAME7
#define LOCALE_SABBREVMONTHNAME8
#define LOCALE_SMONTHNAME10
#define LOCALE_SMONTHNAME9
#define LOCALE_SABBREVMONTHNAME12
#define LOCALE_SABBREVDAYNAME7