Giter VIP home page Giter VIP logo

Comments (8)

Deraen avatar Deraen commented on August 18, 2024

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.

from packages.

pandeiro avatar pandeiro commented on August 18, 2024

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?

from packages.

Deraen avatar Deraen commented on August 18, 2024

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.

from packages.

pandeiro avatar pandeiro commented on August 18, 2024

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

from packages.

yayitswei avatar yayitswei commented on August 18, 2024

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

from packages.

jwr avatar jwr commented on August 18, 2024

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

from packages.

Deraen avatar Deraen commented on August 18, 2024

@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.

from packages.

jwr avatar jwr commented on August 18, 2024

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

from packages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.