In 12 hours format,i have to create a interval of 15 minutes in moment which is working fine with 30 minutes interval.  var hours = [];     for (let hour = 0; hour < 24; hour++) {       hours.push(moment({ hour }).format('h:mm a'));...
I am trying to create an array with number of days between two dates.   The dates can be anything but i am using the following for this example.  Start : 11/30/2018, End: 09/30/2019 Array= [30,31,29,30....31]   What i am trying to do:    Here date ra...
I have a date/time with a timezone and want to convert it into UTC  const date = '2019-04-10T20:30:00Z'; const zone = 'Asia/Kuala_Lumpur'; const utcDate = moment(date).tz(zone).utc().format(); console.log('UTC Date : ', utcDat...
So I'm trying to get various time zones, and I have set up the times, however, the same time is being displayed in all zones.  Here is my code:  const format = 'HH:MM'  // San Francisco - Time let sanFrancisco = moment().tz('Etc/GMT-8...
I'm getting an error using moment-timezone with America/Sao_Paulo trying to parse date with America/Sao_Paulo offset. I've created this code:  const date = "2019-1-1 23:30"; const format = "YYYY-M-D HH:mm"; const timezone = &#...
I have a quite data-heavy app I'm working on, and I can see in Chrome's profiler that moment is chewing up an enormous amount of CPU when working with large datasets. I'm aware it's reasonably well-known for this, but I don't know...
somehow i tried to get the timezone of America/New_York (my locale time is -1 hour from EST). But im always getting the same time when i use  moment(new Date()).tz("America\New_York").toDate()   Am i using the wrong method or what happened? C...
The code below is at moment-timezone documentation and it works perfectly. The result is what I want. https://momentjs.com/timezone/  import moment from 'moment-timezone';  let timeInput = "2014-06-01 12:00";   var newYork    = moment...
I have a Ruby on Rails application which has several JQuery DataTables that display datetime values which include timezone abbreviations (EST, EDT, PST, PDT, etc.). I want the table sorting to correctly sort these datetime values in the right order....
I have referenced two scripts into my project:  <script src="http://momentjs.com/downloads/moment.js"></script> <script src="http://momentjs.com/downloads/moment-timezone-with-data.js"></script>   And now the c...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.