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

Moment.js Only Within The Last Week

I am using moment.js 'timeAgo' to display some dates. But I only want to use moment.js if t… Read more Moment.js Only Within The Last Week

Why Is Iphone Ios Showing Invalid Date For Momentjs

I have a datepicker which was returning a moment object that was always in UTC timezone. I needed t… Read more Why Is Iphone Ios Showing Invalid Date For Momentjs

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

Get The Days, Hours And Minutes In Moment.js

So This is my first time using Moment.js and I encountered the following problem, so I have this fo… Read more Get The Days, Hours And Minutes In Moment.js

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

Get Array Of Dates Given 2 Dates Using Momentjs In Reactjs

Currently i'm importing Moment and Moment range as below, Need the array of dates between given… Read more Get Array Of Dates Given 2 Dates Using Momentjs In Reactjs

Subtracting Hours From Date String

I am working in node js and by using moment-timezone package I have generated a date: 2017-4-10 19:… Read more Subtracting Hours From Date String

Custom Calendar With Bootstrap And Momentjs

I need to create custom calendar, i don't ask for complete code solution here, but i would like… Read more Custom Calendar With Bootstrap And Momentjs

How To Get All Sundays/mondays/tuesdays Between Two Dates?

Given a start date and an end date, how can I get all the, e.g. Sundays between September 1st and N… Read more How To Get All Sundays/mondays/tuesdays Between Two Dates?

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 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?

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

Use Javascript To Compare Time Ranges

I have a collection of time ranges in the form of Date objects. I need to compare those time ranges… Read more Use Javascript To Compare Time Ranges

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

How Do I Get A Date Object On Momentjs But As Utc (prevent `todate()` From Being `locale`)?

First of all, I really need a Date object because I'm using ReactDatePicker and the selected pr… Read more How Do I Get A Date Object On Momentjs But As Utc (prevent `todate()` From Being `locale`)?

Format Datetime With Moment.js To Show Timezone

I have problem showing timezone with moment.js. I tried with this code: var result = moment(someDa… Read more Format Datetime With Moment.js To Show Timezone

Is Zone Abbreviation Using Moment-zone Library A Dynamic

I am using moment timezone library to show the zone abbreviation after the timestamp. I am using th… Read more Is Zone Abbreviation Using Moment-zone Library A Dynamic

Add Hours Minutes With The Format Hh:mm Using Moment

I am using moment library and from front end I am getting time in HH:mm I need to add hours and min… Read more Add Hours Minutes With The Format Hh:mm Using Moment

Moment Fromnow Returns In 5 Hours When Parsing Utc

trying to format utc time from server in time ago using moment.js fromNow but in some occasions I g… Read more Moment Fromnow Returns In 5 Hours When Parsing Utc

Processing Localised Date To Convert It To Local Date/time Using Moment.js

I am getting translated UTC date from the backend and need to convert the date to localised local t… Read more Processing Localised Date To Convert It To Local Date/time Using Moment.js