惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

K
Kaspersky official blog
Martin Fowler
Martin Fowler
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
博客园_首页
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
MongoDB | Blog
MongoDB | Blog
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
雷峰网
雷峰网
D
Docker
博客园 - 司徒正美
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
U
Unit 42
J
Java Code Geeks
A
About on SuperTechFans
N
Netflix TechBlog - Medium
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security Affairs
I
Intezer
Cisco Talos Blog
Cisco Talos Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
B
Blog RSS Feed
P
Privacy & Cybersecurity Law Blog
T
Tenable Blog
T
Threatpost
H
Hacker News: Front Page
G
Google Developers Blog
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
L
Lohrmann on Cybersecurity
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
A
Arctic Wolf
S
Secure Thoughts
GbyAI
GbyAI
NISL@THU
NISL@THU
S
Security @ Cisco Blogs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Webroot Blog
Webroot Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
O
OpenAI News
Spread Privacy
Spread Privacy
Application and Cybersecurity Blog
Application and Cybersecurity Blog

博客园 - flyingchen

gcc的一个困惑 敏捷项目组 熟悉了以下VIM指令,你会爱死她的 ajax应用如何做好seo - flyingchen - 博客园 nestful - ruby http-rest 客户端 分析 Liskov替换原则与继承 Linux Commands Cannot find autoconf. Please check your autoconf installation pecl报错(1) - flyingchen - 博客园 关于角色访问控制(RBAC) post xml 通过 simplexml_load_string 解析问题 - flyingchen awk学习 php实现单件模式总结(持续更新) 激动网 PHP高级开发工程师 招聘 rsync的命令格式 rsync从linux到linux的文件同步备份 zend + apache + config stop words mmseg 安装错误 error: ’strncmp’ was not declared in this scope
javascript string to date - flyingchen
flyingchen · 2010-05-28 · via 博客园 - flyingchen

还只能用"/"分割时间,“-”还就是不行。

<SCRIPT LANGUAGE="JavaScript">

//execScript('n = DateDiff("d","2003-01-01","2003-01-02")');

//document.write(n);
var s="2003-01-01";
var s2="2003-01-03";
var date=new Date(Date.parse(s.replace(/-/g, "/")));
var date2=new Date(Date.parse(s2.replace(/-/g, "/")));
var str=date2.getTime()-date.getTime();
var sr=str/(24*3600*1000);
//alert(39*365*24*3600*1000);

alert(sr);
  </SCRIPT>