Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Dale Lotts
    so in your example it is 53.832 seconds after 21:47
    Eugene Serkin
    Great. Thank you.
    Matt Johnson-Pint
    @epyx25 - please don't ask us for help with performing activities that are in violation of that site's terms of service.
    Daniel Groh
    Hello everyone, is it possible to convert MMMM YYYY to a date? for example: March 2017 to 03-01-2017 ?
    const str = "March 2017";
    const formated = moment("01 " + str).format('MM-DD-YYYY');
    :D ?
    Daniel Groh
    @nostalgie haha nice, didn't thpught that easy. actually I thought something more out of the box, but ok, good tho, thanks
    Daniel Groh
    how can I do this with the right locale tho?
    Matt Johnson-Pint
    @dgroh - just use moment("March 2017", "MMMM YYYY").format("MM-DD-YYYY"). The current locale will be used.
    Fong Fan
    Hi friends, I'm interested in contributing to moment as my first open source project. I am investigating this ticket: moment/moment#4301
    What are the guidelines for taking/assigning github issues?
    Alexandre Faustino
    @voltaaage maybe take a look at the contributing.md file https://github.com/moment/moment/blob/develop/CONTRIBUTING.md
    Personnaly I want to add a new locale to moment :)
    Fong Fan
    It doesn't look like I have any ability to modify the github issues so I'll assume commenting on the issue should be sufficient for claiming it.

    I'm investigating how the code around matchers work and I would like to be able to throw debuggers in to step through it. Could anyone share their development environment setup?

    My setup right now consists of a react app (using create-react-app) that includes the package. I used npm link to point to the package on my local machine which appears to work when I open up node modules. However, my code changes do not appear - I suspect it is because it's referencing the minified version.

    The docs state that grunt release will build the minified version of the package. However, it also requires the tests to pass before it will run.

    Fong Fan
    @icambron ^
    Joe Early
    Anyone alive lol
    David Reghay
    Still breathing yeah
    Joe Early
    I sloved my last problem but now i have a new one
    Changes my searchDate to Jan 18 for some reason
    Hi, all! What's being used for testing moment.js?
    I know it was Jasmine a while ago...
    Tomáš Krmela
    hello there i have question i have gatesbyjs project and i am call moment with this moment(new Date(date)).locale("cs").format("YYYY-MM-DD") when i am try it on local instance all is right displayed when i am deploy it out it use english locale
    Hua Lu
    Hello all, how can i tell some date is valid or not under certain locale with momentjs?
    Jon New
    Is there a way to detect if a given timezone is valid with moment? I see it logs an error when it doesn't recognize, but is there anything I can use programmatically?
    I am getting the time in seconds as a response from the server. How can I convert it to the format of YYYY-MM-DD using momentjs?
    in the frontend
    John Woodruff
    Is there a way to nicely attempt to parse a string into a date? Essentially I’m writing a way to infer a schema on a CSV, (in other words, I don’t know my data before I get it, so I can’t simply assume a format) so I attempt to parse the string value into a date. I thought I could use moment(‘some string’).isValid() but that still throws a deprecation warning stack trace. Is there some way/function I could use to simply test if a string is parseable to a date with moment?
    Hi, what happened to Duration Format Plugin, Uncaught TypeError: moment.duration(...).format is not a function at <anonymous>:1:33 ? (v2.2.1)
    Joe Early
    var backDteValue = moment().day() - 1;
     var lastSaturday = moment().day(- backDteValue);
     lastSaturday = moment(lastSaturday).format("MMMM Mo");
    Anything wrong with my format code? Before it take affect, the date is 10th Feb, after formatting its 2nd feb?
    Joe Early
    sorted it
    Stewart Rand
    Something seems to be wrong with the Typescript typing for moment
    Specifically, moment.localeData() is supposed to return a Locale, according to moment.d.ts
    however, there is a problem with the Locale definition, since none of its properties are prefixed with "_", which is how they really are, due to set() in moment.js
    I'm going to submit a PR for it, unless someone disagrees
    I'm basically going to be prefixing the properties of the Locale definition with an underscore, "_"
    Stewart Rand
    never mind, I'm a moron
    those properties definitely do exist, though
    I have requirement.
    Given Date is: 2018-02-14 (‘YYYY-MM-DD’)
    And I want output in 3 formats which should be localized.
    1) FEB 14 (‘MMM DD’)
    2) FEB 2018 (‘MMM YYYY’)
    3) 14 (‘DD’)
    4) FEB (‘MMM’)
    Can anyone help?
    @mj1856 hi Matt, I try to use moment with millis and I get the depreciation warning. Is it normal for millis as well?
    The issue is this: moment/moment#1407
    Kevin Engle
    Is there a way to alter units on humanize()? For example on moment.duration(2, 'weeks').humanize() I have 14 days returned when I'd rather have it humanized as 2 weeks.
    The documentation isn't really clear, the third example seems to imply 14 days should automatically be humanized as 2 weeks.
    Eder Gomez
    hi guys, can you use momentsJs in Java, if possible, how would you implement it?
    Alex Mitchell
    Could somebody provide comments on my bugfix pull request? I've never contributed to moment before and I want to make sure I'm following the correct convention and procedure. moment/moment#4410
    Hi guys, an issue . I have the same web-app (Django / Backbone /JQuery etc) deployed on two different servers behaving differently - one install reports an error in Moment.js , the other one runs fine (multiple installs). The big diff, with the 'error install' is its on a Linux box that I setup. I wonder if locale issues could cause Moment.js to throw an error?
    Its the same version of code running differently. Additionally, the 'error install' doesn't have an internet connection - runs completely isolated in a private network - when doing this moment.js has an issue. I am using v 2.1.0 of moment (yeah, its oold).
    James Addison
    How can I display 9:30 as 9:30 but 9:00 as just 9?
    Eder Gomez
    @jaddison Being time there is no reason to be to show only the time without the minutes.
    If you wish, you would have to compare the time and format moment().format("HH/hh") (HH for 24hrs. / hh for 12hrs.)
    Hi all