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

Moment.js : Change The Default Humanize() Behavior

In the moment.js documentation the following example is given: moment.duration(1, 'minutes'… Read more Moment.js : Change The Default Humanize() Behavior

Modify Timezone New Date Javascript

I'm using a calendar plugin in which I want the Date object to be stored with a particular time… Read more Modify Timezone New Date Javascript

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

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

Moment.js Deprecation Warning When Comparing Two Dates

I didn't see any SO thread that matches my use case. I'm trying to compare two dates to see… Read more Moment.js Deprecation Warning When Comparing Two Dates

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

Initialize A Moment With The Timezone Offset That I Created It With

I'm using moment and moment-timezone in javascript, and this part of it is one of the most unin… Read more Initialize A Moment With The Timezone Offset That I Created It With

How To Shorten The Timezone Name List Got From Moment.js?

I am using moment.js ( the method I used is moment.tz.names()) to retrieve the timezone name list w… Read more How To Shorten The Timezone Name List Got From Moment.js?

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

How To Get Timezone Offset From Moment Object?

I have moment Object defined as: var moment = require('moment'); moment('2015-12-20T12… Read more How To Get Timezone Offset From Moment Object?

Updating Time Offset With Moment().utcoffset()

I'm facing some issue trying to use moment.js for dealing with time offsets. I collect in an hi… Read more Updating Time Offset With Moment().utcoffset()

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

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

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

Dygraph Showing Dates In An Arbitrary Timezone

I needed to get Dygraph to respect arbitrary timezones. All dates shown in/on/around the graph shou… Read more Dygraph Showing Dates In An Arbitrary Timezone

How To Update The Time Every Second Using "setinterval()" Without The Time Flashing In And Out Every Second?

I'm using a dropdown list that displays different timezones onclick using moment-timezone. For … Read more How To Update The Time Every Second Using "setinterval()" Without The Time Flashing In And Out Every Second?

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

How To Get Amcalendar Filter In 24hours Format (angular-moment.js)

I am using angular-moment, and the moment add function: moment().add(7, 'h');. In order to … Read more How To Get Amcalendar Filter In 24hours Format (angular-moment.js)

Date Went Wrong When Using Momentjs Date Format In Ie 11

I am using Moment.js format function on a current date as var startDate = moment(new Date()).format… Read more Date Went Wrong When Using Momentjs Date Format In Ie 11

How To Check System's Time Format In Chrome - 12 Hours Or 24 Hours In Javascript?

date.toLocaleTimeString does not work in chrome and always return time in 12 hours format. I need t… Read more How To Check System's Time Format In Chrome - 12 Hours Or 24 Hours In Javascript?