luisfarzati / moment-interval Goto Github PK
View Code? Open in Web Editor NEWTime intervals for Moment.js
License: MIT License
Time intervals for Moment.js
License: MIT License
Maybe something like this:
toISOString: function() {
return start.toISOString() + '/' + end.toISOString();
}
The Broken URL is Broken. URL
Requiring moment-interval fails:
$ npm install moment-interval
npm http GET https://registry.npmjs.org/moment-interval
npm http 304 https://registry.npmjs.org/moment-interval
npm http GET https://registry.npmjs.org/moment/2.0.0
npm http 304 https://registry.npmjs.org/moment/2.0.0
[email protected] node_modules/moment-interval
└── [email protected]
$ node
> require('moment-interval')
Error: Cannot find module 'moment-interval'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at repl:1:2
at REPLServer.self.eval (repl.js:110:21)
at Interface.<anonymous> (repl.js:239:12)
at Interface.EventEmitter.emit (events.js:95:17)
at Interface._onLine (readline.js:202:10)
at Interface._line (readline.js:531:8)
Normal moment works though
$ npm install moment
npm http GET https://registry.npmjs.org/moment
nonpm http 304 https://registry.npmjs.org/moment
[email protected] node_modules/moment
$ node
> require('moment')
{ [Function] […]
I'd love to be able to fix it, but I'm just starting to learn node, I still don't know how the packages work, and I'm not really sure what Grunt is… but if it helps in any way, I read somewhere about a similar error having to do with case sensitivity.
Hi,
this is more of a question:
Example:
moment.duration('P1Y2M3W')
throws currently uncaught exception: "P1Y2M3W" is an invalid ISO 8601 duration
.
However, the nW
expression for weeks seems to be an equal property of ISO 8601 durations
This might be not fixable, because the core moment.duration() method doesn't support a week property. Is this why you supply already PnW
as a kind of special case?
Hope this makes sense,
jb
in the fallback case when the environment doesn't support AMD or is not a Node environment, the wrong key returnExports
is used.
moment-range has a convenience function for it. I guess I can compare a given date
with start()
and end()
.
Decimal numbers should be allowed in the format, e.g: P0.5Y and PT0.123S.
This Z designator does however not exists in ISO8601-duration (ref: ISO8601 3.4), and may for all intents and purposes be removed since it is only used as a UTC designation(ISO8601 4.2.4).
Much easier than manual setup. See instructions here:
https://github.com/bower/bower#registering-packages
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.