moment / moment-timezone

Timezone support for moment.js
momentjs.com/timezone
MIT License
3.82k stars 837 forks source link

next DST change date #708

Open simodelle opened 5 years ago

simodelle commented 5 years ago

Is it possible to receive the next date when dst of a specific zone will change?

wschmrdr commented 4 years ago

I know that this is a bit old, but I, for one, would find this helpful as well. For the time being, we'd probably have to search through moment.tz.zone(zonename).untils to get the first number after the current timestamp in milliseconds, return the index, and then get that and the index before to decide which way it will go.

ichernev commented 2 years ago

That sounds reasonable, maybe a method in the zone object, like nextOffsetChange(timestamp).