noahlam / miment Goto Github PK
View Code? Open in Web Editor NEWa fast,light weight,simple and non-dependencies datetime library for javascript ( mini moment )
License: MIT License
a fast,light weight,simple and non-dependencies datetime library for javascript ( mini moment )
License: MIT License
Day.js 了解一下?
您做的事情和这个看起来类似,大小性能之类有什么异同吗 ?
Hi, this library is what I seek for long as an alternative to moment! For now I can see some points that can be improved and I'm interested in implementing some. While for now it's not that "assured" to make any change since the missing of tests. How about adding some cases covering main API? For further changes this can be a good start.
I'm willing to provide PR if it's acceptable.
We can add standard style linting, adding it to Travis config.
两者共存时,会冲突,找不到方法
Determine if the current datetime is between two other datetimes
个人感觉是IE不支持高级语法,所以我在main.js中使用了babel-polyfill进行转换,但是依旧出现上述问题,不知道怎么解决。
ios 版本11.2.6
传入YYYY-MM-DD 是NaN,需要自己改成YYYY/MM/DD
如题
输入的参数应该不是带中文的;中文版 README 也是一样。因为是一句话的事情,就不 PR 了,提醒一声。
This dependency was not found:
再官网例子里的https://noahlam.github.io/Miment/dist/miment-min.js是正确的,可以成功解析
2019-05-15T17:48:53.000+0800 格式的日期字符串
但是npm
包里的却不行, 只返回NaN-NaN-NaN, 版本都是0.0.8
, 很奇怪
For now the distance
method returns a Miment object, which produces confusing result without extra args formatting. Is this behavior by design or can be optimized?
I can think of some alternatives:
distance
also "computed" methods, returning formatted timestamp or date field, instead of Miment object. In this case we can't add offset to a date distance unless parsing it again.Date.toString
. I'm not sure about side effects of this approach.See also difference
API in Moment.js.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.