Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Matt Johnson
    @mj1856
    If you weren't aware, 2018a and 2018b were recalled, so first true release of this year is 2018c. The main change being for Sao Tome.
    Bernhard Gr├╝newaldt
    @clouless
    @mj1856 ok that would be great :) thanks a lot for your effort!
    Kemal Ahmed
    @goatandsheep

    I'm using moment timezone in typescript using bower and really struggling to import it. I used

    import { moment } from '../../../bower_components/moment/min/moment-with-locales.min.js';
    import {moment as momentTimezone} from '../../../bower_components/moment-timezone/builds/moment-timezone-with-data.min.js';

    this gives Uncaught TypeError: moment.tz is not a function

    and sometimes I was getting Uncaught TypeError: (c || "").toLowerCase is not a function but I don't remember what I did to make it do that.

    Kemal Ahmed
    @goatandsheep
    Ok I figured it out. My issue was a javascript issue and this format actually works fine. I was setting the initial value of a property of a web component to return (() => moment.tz.guess()). Changed it to return moment.tz.guess()

    I'm using moment timezone in typescript using bower and really struggling to import it. I used

    import { moment } from '../../../bower_components/moment/min/moment-with-locales.min.js';
    import {moment as momentTimezone} from '../../../bower_components/moment-timezone/builds/moment-timezone-with-data.min.js';

    this gives Uncaught TypeError: moment.tz is not a function

    and sometimes I was getting Uncaught TypeError: (c || "").toLowerCase is not a function but I don't remember what I did to make it do that.Actually my second line of code was:

    import { moment as moment.tz } from '../../../bower_components/moment-timezone/builds/moment-timezone-with-data.min.js';
    Vartan
    @vartana
    Hi I have this 2/14/2018 5:00 AM and it is timezone -07:00
    the computer is on time zone +04:00
    when I use moment with (2/14/2018 5:00 AM) instead of it seeing it as -07:00 it converts to +04
    how can I tell moment my datetime is 2/14/2018 5:00 AM and it is timezone -07:00
    Manish Chandra
    @chandrajob365
    Hi All
    Manish Chandra
    @chandrajob365
    I am using moment-timezone ver: 0.5.14 and @types/moment-timezone ver: 0.5.4 and json-loader ver: 0.5.7
    Using webpack as build tool
    Server side I am able to use moment-timezone
    but on client side its giving error Uncaught TypeError: Cannot read property 'length' of undefined at addZone (moment-timezone.js:385) at Function.loadData [as load] (moment-timezone.js:456) at Object.hasOwnProperty (index.js:2) at __webpack_require__ (bootstrap 93e619d9be8d81d31053:19) at Object.module.exports (client.bundle.js:10625) at __webpack_require__ (bootstrap 93e619d9be8d81d31053:19) at Object.<anonymous> (driver-header-container.tsx:9) at __webpack_require__ (bootstrap 93e619d9be8d81d31053:19) at Object.<anonymous> (fetch.js:461) at __webpack_require__ (bootstrap 93e619d9be8d81d31053:19)
    Basically with above moment -timezone is not able to read ./data/packed/latest.json
    My web pack config
    Client ---
    ```module: {
    rules: [
    {
    test: /.[t,j]sx?$/,
    exclude: [
    /node_modules/
    ],
    use: [
    {
    loader: 'babel-loader',
    options: {
    presets: ['es2015', 'stage-1'],
    plugins: ['transform-decorators-legacy']
    }
    },
    {
    loader: 'ts-loader',
    options: {
    configFileName: './src/common/ts/amd.es5.tsconfig.json',
    },
    }
    ],
    },
    {
    test: /.s?css$/,
    use: ['style-loader', 'css-loader', 'sass-loader'],
    },
            {
                    test: /\.js$/,
                    use: ['react-hot', 'babel-loader'],
                    include: path.join(__dirname, 'vendor')
            },
            {
                    test: /\.(png|jpg|gif|ico)(\?v=\d+\.\d+\.\d+)?$/,
                    use: 'url-loader?limit=100000'
            },
            {
                    test: /\.(eot|com|json|ttf|woff|woff2)(\?v=\d+\.\d+\.\d+)?$/,
                    use: 'url-loader?limit=10000&mimetype=application/octet-stream'
            },
            {
                    test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
                    use: 'url-loader?limit=10000&mimetype=image/svg+xml'
            },
            {
                test: /\.json$/,
                loader: 'json-loader',
            }
        ], ```
    Serrver config ---
    module: { rules: [ { test: /\.ts$/, use: [{ loader: 'ts-loader', options: { configFileName: './src/common/ts/cjs.es5.tsconfig.json', }, }], }, { test: /\.json$/, loader: 'json-loader' } ], },
    Manish Chandra
    @chandrajob365
    Any suggestion ?
    Kate
    @TheKateeeee_twitter
    Hey people, I have a problem. I think because of the daylight saving changes this weekend moment timezone is not confused and say Moment Timezone has no data for CEST. I try to add it with moment.tz.add(...) and moment.tz.load([...]) but I'm not sure where to add it exactly. I have the latest package of moment and moment timezone and running angular 5. Any suggestions?
    Jeff Voss
    @iamwhitebox
    Does anyone know how to use moment to format a date to match this date in JAVA "yyyy-MM-dd'T'HH:mm:ss'Z'"
    Mohit Anand
    @farziengineer
    Hey, is there a place new comers can discuss ?
    Jon Concepcion
    @hijoncon

    In my karma test, I am having an issue. any help with this..

    TypeError: Cannot read property 'format' of undefined

    Shane Bruggeman
    @shanebruggeman
    Hey folks, trying to use moment-timezone in ember-moment and it's attaching to window.moment instead of the moment loaded through my package.json
    I see it using the window.moment as the moment argument here:
    https://github.com/moment/moment-timezone/blob/develop/moment-timezone.js
    The else clause there
    (function (root, factory) {
        "use strict";
    
        /*global define*/
        if (typeof module === 'object' && module.exports) {
            module.exports = factory(require('moment')); // Node
        } else if (typeof define === 'function' && define.amd) {
            define(['moment'], factory);                 // AMD
        } else {
            factory(root.moment);                        // Browser
        }
    }(this, function (moment) {
    If something in ember-moment is importing / requiring in that as a module, how would they specify the arguments?
    Shane Bruggeman
    @shanebruggeman
    Don't know a ton about package defining, so I'm at a loss as to how root comes into here. Ideally it would be the moment dependency brought in from ember-moment's npm install
    Raj
    @rajjaiswalsaumya
    hello everyone.
    i have a date with timezone, that gets parsed on chrome but firefox fails
    how to fix that ?
    Abayomi Omosehin
    @omosehin
    Hello,Pls how can I use moment js in my react app as start date and end date
    how can i achieve the enddate is always greater than the start date
    douglassllc
    @douglassllc
    why would I be getting the deprecation message with the following line of code. I thought the String + format was suppose to remedy the issue. moment.tz('2015:08:20 14:33:20', 'YYYY:MM:DD HH:mm:ss', 'America/New_York') . Also, please not I do not have control over the date format being provide. I know I can convert it myself to 'YYYY-MM-DDTHH:mm:ss' in moment does not show the deprecation message. However, according to the documentation, the line of code should work. Here is the deprecation message I am seeing. "Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info."
    Raymond Bergen
    @FreeFrags

    Hi all does any one know how to use moment and moment-timezone?
    if i do

    import * as moment from 'moment'
    import { utc } from 'moment-timezone'

    i get utc, is not exported by node_modules/moment-js

    i use rollup
    monterey01
    @monterey01
    I am getting below error when installing moment timezone using bower a The "main" field cannot contain minified files
    bower resolved https://github.com/moment/moment-timezone.git#0.5.25
    anyone know how to fix?
    Jack Howard
    @JackHowa
    seeing behavior I don't terribly understand. loading only a few timezones via moment.tz.load(MOMENT_TZ_DATA);. But seeing a whole host of seemingly unincluded timezones available -- and working -- when I use moment.tz with a timezone. I've also tried looking at moment.tz.names() to see available timezones
    found that tz data may be separate from loading the data manually moment/moment-timezone#369
    Jack Howard
    @JackHowa
    It seems like this a hack to get around excluding locales, then manually adding them. does anyone else have any suggestions? moment/moment#2416
    Shreedevi-G-Rao
    @Shreedevi-G-Rao
    Hi all,
    i am using moment('2019-05-21T07:05:11.5685421-07:00').format('MM/DD/YYYY HH:MM:SS') function which is giving wrong time as '05/21/2019 08:05:11' even after changing time zone to (UTC-07:00)Mountain Time(US & Canada) . It should be 07:05:11. Please help me out to get the right time.
    epimeth
    @epimeth
    Hey guys... running grunt data with the latest release no longer succeeds. This is because the latest data dump results in a packed\latest.json containing a zone of "Etc/UTC||||" instead of what used to be "Etc/UTC|UTC|0|0|", ... I'm getting a little lost in the code for where the zones are loaded and figured asking the more hands-on devs here would lead to a quicker resolution of the issue so I can complete a PR I'm working on. I guess my question is - could this be due to IANA breaking how the data is formatted, or is this a change that the devs are already aware of and working on fixing?
    whats interesting is that the latest.json committed to code is 2019b - the same as what is being requested as latest, now, but the latest.json that is generated when I run grunt data is fairly significantly different
    epimeth
    @epimeth
    I can verify that grunt data:2014d with both the code in the release branch as well as the changes I made to it, so it is definitely a data issue - but again, is this a known issue that the devs are working on or is this an oopsie from IANA
    epimeth
    @epimeth
    confirmed adding the following to the very top of function unpack in moment-timezone.js "fixes" the issue
            if (string === 'Etc/UTC||||') {
                string = 'Etc/UTC|UTC|0|0|';
            }
    spoke too soon, npm run test failed 25 assertions
    epimeth
    @epimeth
    and we're fixed