Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe the plugin needs an update #254

Open
babakgm opened this issue Aug 22, 2023 · 3 comments
Open

Maybe the plugin needs an update #254

babakgm opened this issue Aug 22, 2023 · 3 comments

Comments

@babakgm
Copy link

babakgm commented Aug 22, 2023

<script src="node_modules/moment/min/moment.min.js"></script>
<script src="node_modules/moment-jalaali/build/moment-jalaali.js"></script>
<script>
  moment().format('jYYYY/jM/jD')
</script>

this code show wrong format
j2023/j8/j22

@behrang
Copy link
Member

behrang commented Aug 23, 2023

Changing line 4 of index.js to

var moment = require('moment')

and building again with npm run build will fix it.


I lost control of the latest dependency issues in this project, with all the different ways to JS modules. Changing it may also break others code using it. Since I think this project is retiring, it's best to not change it that much.

@babakgm
Copy link
Author

babakgm commented Aug 27, 2023

tanks, alot
If this project is being retired and you think it will have problems in the future, would you suggest a similar jalali callender or something better for the Jalali calendar with the fromnow function?

@behrang
Copy link
Member

behrang commented Nov 14, 2023

As mentioned on the Readme, you may use Intl which is an ECMAScript Internationalization standard to display dates. If you need more, maybe jalaali/jalaali-js might be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants