Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
deno
提交
26bf928d
D
deno
项目概览
张重言
/
deno
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
deno
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
26bf928d
编写于
11月 16, 2019
作者:
L
Leo Chandra
提交者:
Ry Dahl
11月 16, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: std/datetime toIMF bug (#3357)
上级
34ed16ed
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
5 addition
and
4 deletion
+5
-4
std/datetime/mod.ts
std/datetime/mod.ts
+2
-1
std/datetime/test.ts
std/datetime/test.ts
+2
-2
std/http/cookie_test.ts
std/http/cookie_test.ts
+1
-1
未找到文件。
std/datetime/mod.ts
浏览文件 @
26bf928d
...
@@ -126,11 +126,12 @@ export function toIMF(date: Date): string {
...
@@ -126,11 +126,12 @@ export function toIMF(date: Date): string {
const
min
=
dtPad
(
date
.
getUTCMinutes
().
toString
());
const
min
=
dtPad
(
date
.
getUTCMinutes
().
toString
());
const
s
=
dtPad
(
date
.
getUTCSeconds
().
toString
());
const
s
=
dtPad
(
date
.
getUTCSeconds
().
toString
());
const
y
=
date
.
getUTCFullYear
();
const
y
=
date
.
getUTCFullYear
();
const
days
=
[
"
Sun
"
,
"
Mon
"
,
"
Tue
"
,
"
Wed
"
,
"
Thu
s
"
,
"
Fri
"
,
"
Sat
"
];
const
days
=
[
"
Sun
"
,
"
Mon
"
,
"
Tue
"
,
"
Wed
"
,
"
Thu
"
,
"
Fri
"
,
"
Sat
"
];
const
months
=
[
const
months
=
[
"
Jan
"
,
"
Jan
"
,
"
Feb
"
,
"
Feb
"
,
"
Mar
"
,
"
Mar
"
,
"
Apr
"
,
"
May
"
,
"
May
"
,
"
Jun
"
,
"
Jun
"
,
"
Jul
"
,
"
Jul
"
,
...
...
std/datetime/test.ts
浏览文件 @
26bf928d
...
@@ -81,7 +81,7 @@ test({
...
@@ -81,7 +81,7 @@ test({
name
:
"
[DateTime] to IMF
"
,
name
:
"
[DateTime] to IMF
"
,
fn
():
void
{
fn
():
void
{
const
actual
=
datetime
.
toIMF
(
new
Date
(
Date
.
UTC
(
1994
,
3
,
5
,
15
,
32
)));
const
actual
=
datetime
.
toIMF
(
new
Date
(
Date
.
UTC
(
1994
,
3
,
5
,
15
,
32
)));
const
expected
=
"
Tue, 05
May
1994 15:32:00 GMT
"
;
const
expected
=
"
Tue, 05
Apr
1994 15:32:00 GMT
"
;
assertEquals
(
actual
,
expected
);
assertEquals
(
actual
,
expected
);
}
}
});
});
...
@@ -90,7 +90,7 @@ test({
...
@@ -90,7 +90,7 @@ test({
name
:
"
[DateTime] to IMF 0
"
,
name
:
"
[DateTime] to IMF 0
"
,
fn
():
void
{
fn
():
void
{
const
actual
=
datetime
.
toIMF
(
new
Date
(
0
));
const
actual
=
datetime
.
toIMF
(
new
Date
(
0
));
const
expected
=
"
Thu
s
, 01 Jan 1970 00:00:00 GMT
"
;
const
expected
=
"
Thu, 01 Jan 1970 00:00:00 GMT
"
;
assertEquals
(
actual
,
expected
);
assertEquals
(
actual
,
expected
);
}
}
});
});
std/http/cookie_test.ts
浏览文件 @
26bf928d
...
@@ -39,7 +39,7 @@ test({
...
@@ -39,7 +39,7 @@ test({
delCookie
(
res
,
"
deno
"
);
delCookie
(
res
,
"
deno
"
);
assertEquals
(
assertEquals
(
res
.
headers
!
.
get
(
"
Set-Cookie
"
),
res
.
headers
!
.
get
(
"
Set-Cookie
"
),
"
deno=; Expires=Thu
s
, 01 Jan 1970 00:00:00 GMT
"
"
deno=; Expires=Thu, 01 Jan 1970 00:00:00 GMT
"
);
);
}
}
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录