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

date dependency #543

Closed
Mottie opened this issue Oct 23, 2015 · 4 comments
Closed

date dependency #543

Mottie opened this issue Oct 23, 2015 · 4 comments

Comments

@Mottie
Copy link
Contributor

Mottie commented Oct 23, 2015

According to the Pick the modules you need section in the main readme it sound like each module is independent of other modules.

I created this demo to format a date... number.js isn't needed, but it is loaded after date.js and this error appears in the console:

Uncaught TypeError: numberSymbol is not a function ... date.js:593

which corresponds to this line: https://github.com/jquery/globalize/blob/master/src/date/format-properties.js#L25

Just to confirm my suspicions, this demo loads number.js before date.js and it works without any problems.


I should probably open a new issue for this, but would you consider including one big Globalize file that contains all the modules?

@jzaefferer
Copy link
Contributor

According to the Pick the modules you need section in the main readme it sound like each module is independent of other modules.

As far as I can tell, that's wrong. There are several dependencies across modules, and the documentation should make that explicit.

@johnnyreilly
Copy link
Contributor

It does... but not there. If you look at https://github.com/jquery/globalize#2-cldr-content this becomes more apparent. For a visual representation of what module depends on what, take a look at here

@Mottie
Copy link
Contributor Author

Mottie commented Oct 27, 2015

It's still not explicitly stated anywhere. That's a nice tool @johnnyreilly, but it wasn't the first place I looked.

And my other point was that the number module must be loaded first, or the date module throws an error.

@johnnyreilly
Copy link
Contributor

It may not be clear from the tool but the order in which files are listed is the order in which are required.

But yeah, the docs could perhaps be a little clearer. Do you have a suggestion? A docs PR wouldn't take long to turn around...

Mottie added a commit to Mottie/globalize that referenced this issue Oct 27, 2015
rxaviers added a commit to rxaviers/globalize that referenced this issue Dec 15, 2015
rxaviers added a commit that referenced this issue Dec 15, 2015
rxaviers pushed a commit that referenced this issue Jan 17, 2016
rxaviers added a commit that referenced this issue Jan 17, 2016
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

3 participants