Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moment.js extern is out of date #6

Closed
Deraen opened this issue Jan 6, 2015 · 8 comments
Closed

Moment.js extern is out of date #6

Deraen opened this issue Jan 6, 2015 · 8 comments

Comments

@Deraen
Copy link
Member

Deraen commented Jan 6, 2015

Moment.ext.js is, based on comment, for 2.0.0. But it looks to me that it doesn't include even all functions that moment.js 2.0.0 does.

I added some fixes but I'm thinking that there should be some way to test the extern file.

I wonder if it would might be possible to run moment code through closure compiler and then run their unittests against that.

@Deraen
Copy link
Member Author

Deraen commented Jan 7, 2015

Looks like putting the moment.js through Closure compiler will break it even with proper extern file.

Perhaps it would not be too big work to create cljs.core test going through documented api of Moment.

@pandeiro
Copy link
Contributor

Is this still the case? Haven't we straightened it out with eg cljsjs/moment 2.9.0-0 ? If so, can we close this?

@Deraen
Copy link
Member Author

Deraen commented Feb 20, 2015

The extern is still based on Moment 2.6.0 externs.

At the least the following changes would require changes to the extern file:

2.7.0

  • add moment.min and moment.max and deprecate min/max instance methods

(2.8.0

  • lang is renamed to locale, langData -> localeData. Also there is now defineLocale that should be used when creating new locales) this is included, I think

2.8.2

  • add duration#toString()

2.9.0

  • Add firstDayOfWeek, firstDayOfYear locale getters
  • add moment.fn.isBetween
  • Add moment.isDate method
  • Implement toJSON function on Duration
  • Implement moment.fn.utcOffset, deprecate momen.fn.zone

It's easy to implement the changes but they would require some, perhaps manual, testing.

@pandeiro
Copy link
Contributor

Ah ok right; when the next version bump happens from moment I will take the opportunity to revisit this.

@yayitswei
Copy link

+1 for a fix, would like to include the latest moment.js using cljsjs.

@jwr
Copy link

jwr commented May 23, 2015

Just wanted to use moment.js — but I'll hold off and wait for a fix.

@Deraen
Copy link
Member Author

Deraen commented May 23, 2015

@jwr, I think there are quite many people using moment.js already even though the extern is not perfect.

It's probable that the extern won't be improved unless some user creates a PR about this, I'm not using Moment.js myself. Points in my previous comment should still hold and provide a starting point for checking what is broken with the extern.

@jwr
Copy link

jwr commented May 25, 2015

@Deraen thanks. I'll use it, then — and if I hit breakage, I'll try to fix it.

@Deraen Deraen changed the title Moment.js extern is out of date or bad Moment.js extern is out of date Sep 6, 2015
@Deraen Deraen closed this as completed Jan 13, 2017
metasoarous pushed a commit to metasoarous/cljsjs-packages that referenced this issue Jan 17, 2020
port vega component from om to reagent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants