Giter Site home page Giter Site logo

meteor-moment's People

Contributors

acreeger avatar dandv avatar dsyko avatar fintara avatar mizzao avatar multiply avatar possibilities avatar subhog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

meteor-moment's Issues

Unable to install

โœ“ moment
tag: https://github.com/acreeger/meteor-moment.git#v2.6.0

/usr/local/lib/node_modules/meteorite/lib/dependencies/package.js:106
throw('Could not locate package.js within path ' + self.source.packagePa
^
Could not locate package.js within path /Users/acamarata/.meteorite/packages/moment/acreeger/meteor-moment/26156df681750fd6e6ed77043eef32b6653ebbdf

Locale

I can't seem to get locale 'en-gb' working so that dates default to DD/MM/YYYY but the files seem to be missing. Looking in the packages folder (Chrome inspect source) the locales files are not listed.

Following momentjs docs I have tried (as an example), in Chrome inspect

moment.locale('fr')
< "en"
moment(1316116057189).fromNow()
< "3 years ago"
moment().locale('fr')
< Moment {_isAMomentObject: true, _isUTC: false, _pf: Object, _locale: null, _d: Fri Mar 13 2015 11:58:46 GMT+0000 (GMT)โ€ฆ}
moment().locale()
< "en"
moment(1316116057189).fromNow()
< "3 years ago"

Using a locale as third argument throws error

For example: moment('Zaterdag 8 augustus 17:00', 'DD MMMM HH:mm', 'nl'), throws the following error:

TypeError: Cannot call method 'preparse' of null
W20140914-15:03:13.093(2)? (STDERR) at makeMoment (packages/mrt:moment/lib/moment/moment.js:1713)
W20140914-15:03:13.093(2)? (STDERR) at moment (packages/mrt:moment/lib/moment/moment.js:1749)

But it works fine in nodejs as a npm, it's supported since 2.0.0 so the 0.0.2 version difference shouldn't matter.

Feature request: reactivity

Are reactive Moment timestamps supported? Would be great if it counted up "3 seconds ago", "4 seconds ago", etc.

File not found: lib\moment\moment.js

hi im on windows.
tried to install moment on my meteor by cloning it into my packages folder.
when im trying to meteor add moment, it returns an error -
File not found: lib\moment\moment.js
any help?

Typo

Usage description reads var oneMonentPlease = moment();
Should read var oneMomentPlease = moment();

Reactive-Publish package question

I apologize for posting here, though didn't see a git repo for the Reactive Publish package built by MRT. Where would I go to report an issue with that package? Any help would be appreciated. Thansk in advance.

Sincerely,
Chris Campbell
[email protected]

I18n with Meteor 0.6.6

Is it just me or is moment.lang() not switching languages correctly?

 if (moment) {
    moment.lang('sl');
    return moment(datetime).fromNow()+" "+moment.lang();
  }

returns

Friday 11.10.2013 19:57 a few seconds ago en

Probably not including the lang files from package?

What about moment-twix?

it would be great to have another package, e.g. moment-twix to add also twix.js
I tried to make a package for it, but without success. :-(

Any chance you have already foreseen to add it?

Tnx!

Update moment version

Is there a reason why you keep the version of momentjs to 2.6? Some stuff is changing with 2.8 (especially the way i18n is handled), so I think it'd make sense to switch to the 2.8 or even 2.8.1.

Trouble installing Moments on a Windows Meteor Install. Who can help?

I have tried several approaches to get Moments to work within my Meteor install. All failed. I have no clue on why or how to proceed next. I really want this package included and working so I am asking you guys to step in and lend me a hand here?

First approach: adding the moments.js file to the project's /lib folder
So here is my directory setup within the project:
image
In the lib folder, I have only 1 file:
image
Which includes this javascript (only showing the headers here to identify):

//! moment.js
//! version : 2.6.0
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com

I run Meteor 0.8.0.1.

As to the code in my application (which is a VERY basic setup just to get starting):

myapp.js contains the following javascript:

UI.registerHelper("formatDate", function(datetime){
        if (moment) {
            return moment(datetime).format("MM/DD/YYYY");
        }
        else {
            return datetime;
        }
        });
}

In my projects template, I have this:

<template name="projectRow">
    <tr class="projectRow">
        <td>{{name}}</td>
        <td>{{client}}</td>
        <td>{{formatDate duedate}}</td>
        <td>{{status}}</td>
    </tr>
</template>

When I try to run this project, the server is failing to show me the formatted date, and the javascript console shows me the following errors:
image
As you can see, the data is not showed in the row, and obviously the browser is stumbling over code it can not interpret, as I take from the javascript console because moment is not defined.
In m.h.o. this shows that Moment is not correctly installed?
So what is missing in this setup? I went from the idea, that Moment does not need to be installed, but just needs to be in the /lib folder as a script and if that folder is in the main project folder, would be available to both server and client without any further doing? Where am I wrong here?

Second approach: install as a meteor package
As this is a Windows installation, I can not use Meteorite since that is not working on Windows yet. So, according to instructions on the Meteorite site and the Meteor site, I just mimicked the method that Meteorite does. What did I do?

First, I git cloned the package into my packages folder like this:
image

So that seemed to have gone well. Next, I checked my packages folder, which shows me this:

image

Looking in the moment folder, everything seems OK to me:
image

Next, I add the package to my Meteor installation by: [meteor add moment] like this:
image
Now, this throws some questions to me. First, it seems moment is not commenting back with something like "moments your script for nice formatting" or similar which all other packages seem to do, which has me wondering if this install even went correctly. On the other hand, there are no errors either. So. Using the command [meteor list --using] I checked what Meteor itself thinks of it:

image

Which makes me believe, Meteor thinks that Moment installed correctly and is using the package? True?

Now. Since I now want to use THIS package install as opposed to Approach #1, I delete the moment.js file from the /lib folder, and re-start the server with this new environment.
It reports back to me, that myapp is running:

image

So this seems to be all right. Not? However, when running the app in the browser, I get exactly the same error message:

image

Problem
I get errors either way. It seems to me, Moments did not install correctly, OR there may be incompatibility problems with Meteor 0.8.0.1. in a Windows environment or honestly, I made some huge mistake in either the installation, or maybe in my code setup.

Can someone experienced please shine his light upon this and help me out here?
Thank you in advance.

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.