Comments (5)
我觉得你得注意一下javascript的时间set函数,看看参数是从零开始还是从1开始,挺坑人的。
发件人: David Jiang [mailto:[email protected]]
发送时间: 2014年3月18日 13:39
收件人: hackerzhou/Love
主题: [Love] 时间计算错误你们有遇到么? (#5)
比如我用这个代码计算了一个2013年10月30日到现在(14年3月18日)的时间,明明是139天但是却显示在网站上是108天,是我使用错误还是什么错误??
—
Reply to this email directly or view it on GitHub #5 . https://github.com/notifications/beacon/3645791__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxMDc0MDMxNiwiZGF0YSI6eyJpZCI6Mjc5MTIzODR9fQ==--a0f4efb62c3dd205a21d4d2d17cb356384f5d62c.gif
from love.
我也遇到了这个问题,但是变换一下表达就对了,原本为什么错,我也搞不清楚。
我commit的上面有这部分代码。我是按天计算的,可供参考。
from love.
看来你们都不知道javascript的date是从0-11的。。。
from love.
== 我去...服了,看来我的程序员思维还不够深入啊!
from love.
对 会差一个月,因为是从0开始算的= =
from love.
Related Issues (20)
- 八卦一下,为啥链接是ex_love了 HOT 4
- 最好花里有婚纱照
- 这么久了,然后就加ex了 HOT 8
- 一位英语不好的,不是学计算机的**大学生 HOT 14
- 域名是怎么申请下来的,请指教 HOT 1
- 有需要移动版本的可以参考这个项目 HOT 1
- 关于时间的问题 HOT 5
- the timer issue HOT 1
- 打开页面里面说File not found. HOT 5
- fork到自己仓库里,打开github-pages就能访问看效果了 HOT 5
- 想知道前辈你们的后续…… HOT 2
- wordpress 访问不了,老铁。 HOT 1
- Halo sayang
- Feels
- Love HOT 2
- System good
- Loh4
- Love
- 每一朵花是怎么画出来的,太叼了,能提供个画一朵花的函数么 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from love.