Skip to content Skip to sidebar Skip to footer
Showing posts with the label Momentjs

Moment.js Timezone Inconsistency

I am formatting a given date using momentjs. The following behaves differently in different timezon… Read more Moment.js Timezone Inconsistency

Moment.js Diff Date Formatting

I'm using moment.js and want to calculate the difference between two timestamp,format them afte… Read more Moment.js Diff Date Formatting

Moment Different Behaviour On Different Browsers

Let the following snippet: If you run it with some Firefox versions (such as Firefox 61.0.1) or wi… Read more Moment Different Behaviour On Different Browsers

How To Properly Convert End_time Timestamp Into Date

I'm requesting data from Facebook Insights API with granularity set to a day, let's take li… Read more How To Properly Convert End_time Timestamp Into Date

Convert Minutes To Days, Hours And Minutes Using Moment Js

I am using moment js to convert minutes in to days, hours and minutes moment.utc().startOf('yea… Read more Convert Minutes To Days, Hours And Minutes Using Moment Js

Display Users Local Zone Abbreviation

I was trying to use z or zz in format to display the timezone at the end of the string and found th… Read more Display Users Local Zone Abbreviation

Mocking Moment() And Moment().format Using Jest

I'm unable to mock moment() or moment().format functions. I have states where, currentDateMomen… Read more Mocking Moment() And Moment().format Using Jest

Invalid Date Using Moment Javascript And Datetimepicker

This happens using dateTimePicker and moment.js: If I use this line code: console.info($('#in… Read more Invalid Date Using Moment Javascript And Datetimepicker

Days/weeks Ago From Specific Date With Moment.js

I work with moment.js and I have 3 different dates, e.g. 30.07.2018 12.06.2018 10.05.2018 I now t… Read more Days/weeks Ago From Specific Date With Moment.js

Create Moment Object From Utc String

I'm getting from my webservice an UTC date String such as the following : '2015-06-06T12:3… Read more Create Moment Object From Utc String

Manipulating Date/time With Js And Moment

I have 2 dates and I need to create a 3rd date using those 2 dates. if (document.getElementById(… Read more Manipulating Date/time With Js And Moment

Moment Js Subtract Method Returns 12 Hour Difference When There Is Only Zero Hour Left

I want to display remaining hours, minutes and seconds to a specific preset time (01:00 PM) from th… Read more Moment Js Subtract Method Returns 12 Hour Difference When There Is Only Zero Hour Left

Why Does Momentjs Isdst() Return Wrong Time When Zone() Is Used

I'm trying to check for isDST() (returns true or false if daylight saving time is active). It w… Read more Why Does Momentjs Isdst() Return Wrong Time When Zone() Is Used

Round A Timestamp To The Nearest Date

I need to group a bunch of items in my web app by date created. Each item has an exact timestamp, e… Read more Round A Timestamp To The Nearest Date

Is It Possible To Edit The Granularity Of The Moment#to Output?

With MomentJS's Moment#to method, is there any way that I can control the output at all? I'… Read more Is It Possible To Edit The Granularity Of The Moment#to Output?

How To Calculate The Time Left In Days, Hours, Minutes, And Seconds Left To Reach Certain Day?

I am using Moment.js to retrieve the next Friday (moment().day(5).format();) which works successful… Read more How To Calculate The Time Left In Days, Hours, Minutes, And Seconds Left To Reach Certain Day?

Moment.js Displays Wrong Time

I'm using jQuery.countdown and moment.js to create a multiple instance/time zone aware countdow… Read more Moment.js Displays Wrong Time

Split From_date And To_date To A List Of Date Range Array

How can I transform from this array [ { 'date_from': '2017-05-06 00:00:00&… Read more Split From_date And To_date To A List Of Date Range Array

Moment Format Returns Invalid Date

i have a date which i formated using moment to be shown like this: 03/04/2105. I want to transform … Read more Moment Format Returns Invalid Date

Moment.js - Change A Two Digit Value To Milliseconds Using Moment

At the moment I have an input field that allows you to choose an hour by entering two digits. for e… Read more Moment.js - Change A Two Digit Value To Milliseconds Using Moment