22 #include <wine/port.h> 36 #define TIME_EPOCH ((ULONGLONG)(369 * 365 + 89) * 86400 * 1000) 52 static const WCHAR toLocaleStringW[] = {
't',
'o',
'L',
'o',
'c',
'a',
'l',
'e',
'S',
't',
'r',
'i',
'n',
'g',0};
54 static const WCHAR toISOStringW[] = {
't',
'o',
'I',
'S',
'O',
'S',
't',
'r',
'i',
'n',
'g',0};
55 static const WCHAR toUTCStringW[] = {
't',
'o',
'U',
'T',
'C',
'S',
't',
'r',
'i',
'n',
'g',0};
56 static const WCHAR toGMTStringW[] = {
't',
'o',
'G',
'M',
'T',
'S',
't',
'r',
'i',
'n',
'g',0};
57 static const WCHAR toDateStringW[] = {
't',
'o',
'D',
'a',
't',
'e',
'S',
't',
'r',
'i',
'n',
'g',0};
58 static const WCHAR toTimeStringW[] = {
't',
'o',
'T',
'i',
'm',
'e',
'S',
't',
'r',
'i',
'n',
'g',0};
59 static const WCHAR toLocaleDateStringW[] = {
't',
'o',
'L',
'o',
'c',
'a',
'l',
'e',
'D',
'a',
't',
'e',
'S',
't',
'r',
'i',
'n',
'g',0};
60 static const WCHAR toLocaleTimeStringW[] = {
't',
'o',
'L',
'o',
'c',
'a',
'l',
'e',
'T',
'i',
'm',
'e',
'S',
't',
'r',
'i',
'n',
'g',0};
62 static const WCHAR getFullYearW[] = {
'g',
'e',
't',
'F',
'u',
'l',
'l',
'Y',
'e',
'a',
'r',0};
63 static const WCHAR getUTCFullYearW[] = {
'g',
'e',
't',
'U',
'T',
'C',
'F',
'u',
'l',
'l',
'Y',
'e',
'a',
'r',0};
65 static const WCHAR getUTCMonthW[] = {
'g',
'e',
't',
'U',
'T',
'C',
'M',
'o',
'n',
't',
'h',0};
67 static const WCHAR getUTCDateW[] = {
'g',
'e',
't',
'U',
'T',
'C',
'D',
'a',
't',
'e',0};
71 static const WCHAR getUTCHoursW[] = {
'g',
'e',
't',
'U',
'T',
'C',
'H',
'o',
'u',
'r',
's',0};
72 static const WCHAR getMinutesW[] = {
'g',
'e',
't',
'M',
'i',
'n',
'u',
't',
'e',
's',0};
73 static const WCHAR getUTCMinutesW[] = {
'g',
'e',
't',
'U',
'T',
'C',
'M',
'i',
'n',
'u',
't',
'e',
's',0};
74 static const WCHAR getSecondsW[] = {
'g',
'e',
't',
'S',
'e',
'c',
'o',
'n',
'd',
's',0};
75 static const WCHAR getUTCSecondsW[] = {
'g',
'e',
't',
'U',
'T',
'C',
'S',
'e',
'c',
'o',
'n',
'd',
's',0};
76 static const WCHAR getMillisecondsW[] = {
'g',
'e',
't',
'M',
'i',
'l',
'l',
'i',
's',
'e',
'c',
'o',
'n',
'd',
's',0};
77 static const WCHAR getUTCMillisecondsW[] = {
'g',
'e',
't',
'U',
'T',
'C',
'M',
'i',
'l',
'l',
'i',
's',
'e',
'c',
'o',
'n',
'd',
's',0};
78 static const WCHAR getTimezoneOffsetW[] = {
'g',
'e',
't',
'T',
'i',
'm',
'e',
'z',
'o',
'n',
'e',
'O',
'f',
'f',
's',
'e',
't',0};
80 static const WCHAR setMillisecondsW[] = {
's',
'e',
't',
'M',
'i',
'l',
'l',
'i',
's',
'e',
'c',
'o',
'n',
'd',
's',0};
81 static const WCHAR setUTCMillisecondsW[] = {
's',
'e',
't',
'U',
'T',
'C',
'M',
'i',
'l',
'l',
'i',
's',
'e',
'c',
'o',
'n',
'd',
's',0};
82 static const WCHAR setSecondsW[] = {
's',
'e',
't',
'S',
'e',
'c',
'o',
'n',
'd',
's',0};
83 static const WCHAR setUTCSecondsW[] = {
's',
'e',
't',
'U',
'T',
'C',
'S',
'e',
'c',
'o',
'n',
'd',
's',0};
84 static const WCHAR setMinutesW[] = {
's',
'e',
't',
'M',
'i',
'n',
'u',
't',
'e',
's',0};
85 static const WCHAR setUTCMinutesW[] = {
's',
'e',
't',
'U',
'T',
'C',
'M',
'i',
'n',
'u',
't',
'e',
's',0};
87 static const WCHAR setUTCHoursW[] = {
's',
'e',
't',
'U',
'T',
'C',
'H',
'o',
'u',
'r',
's',0};
89 static const WCHAR setUTCDateW[] = {
's',
'e',
't',
'U',
'T',
'C',
'D',
'a',
't',
'e',0};
91 static const WCHAR setUTCMonthW[] = {
's',
'e',
't',
'U',
'T',
'C',
'M',
'o',
'n',
't',
'h',0};
92 static const WCHAR setFullYearW[] = {
's',
'e',
't',
'F',
'u',
'l',
'l',
'Y',
'e',
'a',
'r',0};
93 static 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 size_t double int int int * sign
static const WCHAR DateW[]
static HRESULT Date_setUTCFullYear(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static jsstr_t * jsstr_alloc(const WCHAR *str)
jsstr_t * jsstr_nan(void)
static const WCHAR setUTCHoursW[]
static DOUBLE min_from_time(DOUBLE time)
static HRESULT create_date(script_ctx_t *ctx, jsdisp_t *object_prototype, DOUBLE time, jsdisp_t **ret)
static const WCHAR * jsstr_flatten(jsstr_t *str)
DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION lpTimeZoneInformation)
void jsval_release(jsval_t val)
#define MAKELCID(lgid, srtid)
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
static HRESULT Date_toISOString(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)
#define LOCALE_SABBREVMONTHNAME12
static const WCHAR getTimezoneOffsetW[]
static HRESULT DateConstr_now(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
#define JS_E_DATE_EXPECTED
static HRESULT Date_getDate(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR parseW[]
#define LOCALE_SABBREVDAYNAME2
#define LOCALE_SABBREVMONTHNAME1
static DOUBLE week_day(DOUBLE time)
#define LOCALE_SMONTHNAME5
static DOUBLE sec_from_time(DOUBLE time)
static DateInstance * date_this(vdisp_t *jsthis)
static const WCHAR getMonthW[]
static const WCHAR getUTCMinutesW[]
#define LOCALE_SABBREVMONTHNAME6
static SYSTEMTIME create_systemtime(DOUBLE time)
static DOUBLE year_from_time(DOUBLE time)
static HRESULT Date_getFullYear(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
#define LOCALE_SMONTHNAME2
static const WCHAR setUTCFullYearW[]
#define LOCALE_SABBREVDAYNAME4
GLdouble GLdouble GLdouble r
#define LOCALE_SABBREVDAYNAME7
static const WCHAR getHoursW[]
#define LOCALE_SABBREVDAYNAME1
static DateInstance * date_from_jsdisp(jsdisp_t *jsdisp)
static DOUBLE day(DOUBLE time)
static HRESULT Date_setUTCSeconds(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
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)
static const WCHAR getDayW[]
static HRESULT Date_toTimeString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
_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)
static const WCHAR setSecondsW[]
static const WCHAR toDateStringW[]
static const WCHAR setYearW[]
#define LOCALE_SMONTHNAME6
static HRESULT Date_setUTCMonth(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_setDate(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const builtin_prop_t Date_props[]
static DOUBLE local_time(DOUBLE time, DateInstance *date)
static const WCHAR setUTCMonthW[]
#define LOCALE_SABBREVMONTHNAME7
static HRESULT Date_setUTCMinutes(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 BOOL is_string(parse_buffer *buf)
static const WCHAR getYearW[]
static const WCHAR getSecondsW[]
static unsigned jsstr_length(jsstr_t *str)
static HRESULT Date_valueOf(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
static void jsstr_release(jsstr_t *str)
static HRESULT Date_setMonth(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR setUTCDateW[]
static const WCHAR getUTCSecondsW[]
#define LOCALE_SABBREVMONTHNAME3
BOOL WINAPI FileTimeToLocalFileTime(IN CONST FILETIME *lpFileTime, OUT LPFILETIME lpLocalFileTime)
static DOUBLE make_day(DOUBLE year, DOUBLE month, DOUBLE day)
static DOUBLE time_within_day(DOUBLE time)
static const WCHAR toTimeStringW[]
#define LOCALE_SMONTHNAME8
static const WCHAR setUTCMinutesW[]
static const WCHAR toUTCStringW[]
static void * heap_alloc(size_t len)
#define LOCALE_SABBREVMONTHNAME8
#define SUBLANG_ENGLISH_US
static const WCHAR setHoursW[]
static HRESULT Date_getUTCMilliseconds(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
static const WCHAR setFullYearW[]
GLenum GLuint GLenum GLsizei const GLchar * buf
#define LOCALE_SABBREVDAYNAME3
static HRESULT Date_toDateString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
#define LOCALE_SABBREVMONTHNAME5
#define LOCALE_SMONTHNAME1
static const builtin_info_t DateInst_info
static const WCHAR getUTCMonthW[]
HRESULT to_number(script_ctx_t *, jsval_t, double *) DECLSPEC_HIDDEN
static HRESULT Date_getSeconds(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR nowW[]
static DOUBLE time_clip(DOUBLE time)
static DOUBLE days_in_year(DOUBLE year)
static jsstr_t * get_string(jsval_t v)
#define LOCALE_SABBREVMONTHNAME10
#define LOCALE_SABBREVDAYNAME6
static HRESULT date_utc(script_ctx_t *ctx, unsigned argc, jsval_t *argv, double *ret)
static const WCHAR toISOStringW[]
static HRESULT to_string(VARIANT *src, BSTR *dst)
static DOUBLE daylight_saving_ta(DOUBLE time, DateInstance *date)
static const WCHAR toLocaleDateStringW[]
#define LOCALE_SABBREVMONTHNAME4
static DOUBLE hour_from_time(DOUBLE time)
#define LOCALE_SMONTHNAME4
static HRESULT Date_setSeconds(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static DOUBLE date_from_time(DOUBLE time)
static HRESULT Date_getYear(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_getUTCMonth(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static jsval_t jsval_string(jsstr_t *str)
static HRESULT date_to_string(DOUBLE time, BOOL show_offset, int offset, jsval_t *r)
static HRESULT Date_setMinutes(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
static const builtin_info_t Date_info
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 dateobj_to_date_string(DateInstance *date, jsval_t *r)
static const WCHAR valueOfW[]
static int day_from_month(int month, int in_leap_year)
static const WCHAR toGMTStringW[]
#define LOCALE_SMONTHNAME11
_Check_return_ double __cdecl fmod(_In_ double x, _In_ double y)
static const WCHAR toStringW[]
static const builtin_prop_t DateConstr_props[]
#define LOCALE_SMONTHNAME10
static const WCHAR toLocaleStringW[]
static BOOL is_vclass(vdisp_t *vdisp, jsclass_t class)
#define LOCALE_SABBREVMONTHNAME2
static const WCHAR getUTCDateW[]
static HRESULT Date_toLocaleDateString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_getMonth(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 HRESULT Date_setUTCDate(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR UTCW[]
static HRESULT Date_getTimezoneOffset(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR getFullYearW[]
static DOUBLE month_from_time(DOUBLE time)
GLsizei const GLchar *const * strings
static HRESULT DateConstr_UTC(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
#define LOCALE_SMONTHNAME3
static HRESULT date_parse(jsstr_t *input_str, double *ret)
static DOUBLE ms_from_time(DOUBLE time)
static HRESULT Date_getMilliseconds(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR getMillisecondsW[]
static const WCHAR setMonthW[]
static HRESULT Date_getUTCSeconds(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_getDay(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_toGMTString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static DOUBLE make_date(DOUBLE day, DOUBLE time)
static HRESULT Date_getTime(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
int _cdecl swprintf(const WCHAR *,...)
static DOUBLE day_from_year(DOUBLE year)
WINE_DEFAULT_DEBUG_CHANNEL(jscript)
#define DEFAULT_FUNCTION_VALUE
static HRESULT dateobj_to_string(DateInstance *date, jsval_t *r)
static const WCHAR getUTCHoursW[]
static const WCHAR getMinutesW[]
static HRESULT Date_getUTCFullYear(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR getUTCMillisecondsW[]
static HRESULT Date_setUTCHours(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
__CRT_INLINE void __cdecl ftime(struct timeb *_Tmb)
static const WCHAR toLocaleTimeStringW[]
#define LOCALE_SABBREVMONTHNAME9
static const WCHAR setUTCSecondsW[]
#define LOCALE_SABBREVMONTHNAME11
GLenum GLenum GLenum input
static const WCHAR setMinutesW[]
static DOUBLE utc(DOUBLE time, DateInstance *date)
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
static double date_now(void)
static HRESULT Date_setUTCMilliseconds(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
#define LOCALE_SABBREVDAYNAME5
HRESULT create_date_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp_t **ret)
static const WCHAR getDateW[]
#define LOCALE_SMONTHNAME9
static void jsdisp_release(jsdisp_t *jsdisp)
static HRESULT Date_setHours(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static DOUBLE time_from_year(DOUBLE year)
#define LOCALE_SMONTHNAME12
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
GLint GLint GLint GLint GLint GLint y
static jsval_t jsval_obj(jsdisp_t *obj)
static HRESULT Date_getUTCMinutes(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_setFullYear(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR setMillisecondsW[]
jsstr_t * jsstr_alloc_buf(unsigned len, WCHAR **buf)
static HRESULT Date_getUTCDate(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 const WCHAR getUTCFullYearW[]
static HRESULT create_utc_string(script_ctx_t *ctx, vdisp_t *jsthis, jsval_t *r)
static const WCHAR getUTCDayW[]
#define LOCALE_SMONTHNAME7
HRESULT throw_type_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str)
static HRESULT Date_getHours(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
_Check_return_ _CRTIMP double __cdecl floor(_In_ double x)
static HRESULT Date_setYear(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
HRESULT init_dispex_from_constr(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *constr)
static DOUBLE convert_time(int year, SYSTEMTIME st)
static HRESULT Date_getUTCHours(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Date_getMinutes(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 HRESULT Date_setTime(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR setDateW[]
static const WCHAR setTimeW[]
static DOUBLE make_time(DOUBLE hour, DOUBLE min, DOUBLE sec, DOUBLE ms)
static HRESULT Date_toLocaleString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR getTimeW[]
static HRESULT Date_getUTCDay(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_get_value(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static const WCHAR setUTCMillisecondsW[]
static jsval_t jsval_number(double n)
static HRESULT Date_setMilliseconds(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static BOOL heap_free(void *mem)
HRESULT to_primitive(script_ctx_t *, jsval_t, jsval_t *, hint_t) DECLSPEC_HIDDEN
static HRESULT Date_toLocaleTimeString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)