I'm trying to understand when moving from using moment to using moment-timezone, do I need to replace references to the imported moment with references to moment-timezone instead? Does one replace the other (if I want to use moment-timezone features)?
By default, moment does not have a .tz() function, so if you do:
import moment from 'moment';
moment.tz.guess();
at this point tz is undefined. But if you import both:
import moment from 'moment';
import momentTimezone from 'moment-timezone';
Now both of these are valid:
moment.tz.guess();
momentTimezone.tz.guess();
Does this mean if you want to use the moment-timezone features you just import it and then you can continue to use moment as before, now with the added .tz property?
How does .tz get added to the original moment import just from importing the moment-timezone library?