moment-timezone icon indicating copy to clipboard operation
moment-timezone copied to clipboard

next DST change date

Open simodelle opened this issue 6 years ago • 2 comments

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

simodelle avatar Dec 19 '18 16:12 simodelle

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.

wschmrdr avatar Dec 05 '19 19:12 wschmrdr

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

ichernev avatar Aug 27 '22 16:08 ichernev