Closed Chakit22 closed 7 months ago
moment.tz()
is just an extension to the base moment()
function. The documentation you linked to explicitly says it takes all the parameters of moment()
, with the addition of a String
parameter at the end.
The return types and validations are all the same as moment()
— you should read the core documentation to get more details on those. The only additions are:
moment.tz()
is provided a time zone string that it doesn't have data for, a warning will be logged in the console.
I was trying to build a feature for a project where I had to use moment to convert a unixTimestamp to another timeZone's time. I tried to look through the documentation of moment-timezone and found this method moment.tz() which can work.
The issue is I am not finding anywhere in the documentation more about this function. I have some questions about it:
From the documentation i could just see that this is the function which can help me calculate the timezones but nothing more mentioned about the return types, parameters, errors, exceptions etc.
It'd be great if someone could get me answer's to these or some link to some other doc on the web which explains in detail?
Note: This is the doc I am referring: https://momentjs.com/timezone/docs/#/using-timezones/parsing-in-zone/
Thanks !