Open malikarami opened 2 years ago
Hi,
The reason for dependency is surely for calculating the date and time in accordance to day-light saving rules. If the dependency was not there, the calculated date and time would be wrong.
About the tz
function not working, I'm not sure that it even existed when this project was created. But if you are interested, we welcome pull-requests.
So if the moment-timezone dependency is there and I suppose it is also adding to the final bundle size, why don't you (moment-jalaali) support the tz
functionalities for Iran timezone?
About the PR, I noticed that someone had opened such a request but that was closed due to the fact that moment-timezone is a heavy package.
PS: Am I correct in assuming that in the projects that use moment-jalaali, the moment-timezone lib is also included in the final bundle?
If you are interested in working on this issue, check here: https://github.com/jalaali/moment-jalaali/pull/216#issuecomment-1256950515
Hi,
I am trying to config Moment-Jalaali to format date and time based on a timezone, and I have noticed that Moment-Timezone is a dependency of Moment-Jalaali. Can you please explain the reason behind that? Is Moment-Jalaali really dependent on Moment-Timezone? If so, and if the package is installed, Why does Moment-Jalaali fail to support
moment.tz()
functionality?I have also found out that
moment().tz('example-timezone').format()
works and converts the timestamps to the example timezone but if you usemoment().tz('example-timezone')
without the taggingformat()
function, it would trough an error.Thanks in advance for noticing.