To detect DST, use the .isDST()
method: http://momentjs.com/docs/#/query/is-daylight-saving-time/
moment([2011, 2, 12]).isDST(); // false, March 12 2011 is not DST
moment([2011, 2, 14]).isDST(); // true, March 14 2011 is DST
Using this test, you should be able to determine how to modify your program’s behavior accordingly.
Related Contents:
- Get the time difference between two datetimes
- Get hours difference between two dates in Moment Js
- “Deprecation warning: moment construction falls back to js Date” when trying to convert RFC2822 date in moment.js
- How to JSON stringify a javascript Date and preserve timezone
- Moment.js: Date between dates
- Moment Js UTC to Local Time
- How can I remove time from date with Moment.js?
- How to convert Moment.js date to users local timezone?
- Javascript Generate Array of Hours in the Day Starting with Current Hour [closed]
- How to format a JavaScript date
- Where can I find documentation on formatting a date in JavaScript?
- How to add days to Date?
- Get month name from Date
- JavaScript function to add X months to a date
- Is the Javascript date object always one day off?
- Incrementing a date in JavaScript
- jQuery UI DatePicker to show month year only
- Get String in YYYYMMDD format from JS date object?
- How to calculate the number of days between two dates? [duplicate]
- How to validate date with format “mm/dd/yyyy” in JavaScript?
- How to add months to a date in JavaScript? [duplicate]
- How do I format a date in JavaScript?
- Difference between two dates in years, months, days in JavaScript
- Current time formatting with Javascript
- Moment js date time comparison
- How to convert dd/mm/yyyy string into JavaScript Date object?
- How to format a UTC date as a `YYYY-MM-DD hh:mm:ss` string using NodeJS?
- How to convert an ISO date to the date format yyyy-mm-dd?
- javascript to find leap year
- javascript Date timezone issue
- Get the current year in JavaScript
- Min/Max of dates in an array?
- How to get year/month/day from a date object?
- Calculate the date yesterday in JavaScript
- Convert normal date to unix timestamp
- Deprecation warning in Moment.js – Not in a recognized ISO format
- JavaScript new Date Ordinal (st, nd, rd, th)
- Easiest way to convert month name to month number in JS ? (Jan = 01)
- How to Convert any of the 5 Islamic (Hijri) Calendars’ Dates to any of 18 World Calendars without External Libraries or Complex Astronomical Formulas
- JavaScript Date Comparisons Don’t Equal [duplicate]
- Javascript: parse a string to Date as LOCAL time zone
- Regarding JavaScript new Date() and Date.parse()
- Change format of md-datepicker in Angular Material with momentjs
- JavaScript date objects UK dates
- Add a duration to a moment (moment.js)
- moment.js 24h format
- How to get the day of the week from the day number in JavaScript?
- add/subtract business days in Javascript
- How do I set a mock date in Jest?
- Format Date time in AngularJS