Using from moment.js in TimeLine

425 views
Skip to first unread message

Sayed Abolfazl Fatemi

unread,
Aug 10, 2014, 4:37:43 AM8/10/14
to chap-link...@googlegroups.com
Salam.
I want to use Jalaali Date (http://en.wikipedia.org/wiki/Jalali_calendar) in TimeLine.
After reserches found moment.js (http://momentjs.com) that help us date in javascript.
The good plugin for moment.js that resolve our problem is Jalaali Calendar (http://momentjs.com/docs/#/plugins/jalaali) that make dates in Jalaali calendar type.
Please help me to use from this plugin and moment.js with TimeLine.
Thanks.
(excuse me for bad english)

Jos de Jong

unread,
Aug 11, 2014, 3:09:44 AM8/11/14
to chap-link...@googlegroups.com
Hi, that's not so trivial. You will have to rewrite the StepDate prototype for that. It may be slightly easier to do when using the successor of the Timeline from vis.js, as it uses moment.js already for date formatting. In taht case you will have to rewrite the TimeStep prototype.

Sayed Abolfazl Fatemi

unread,
Aug 12, 2014, 4:42:07 AM8/12/14
to chap-link...@googlegroups.com
Thanks for your reply.
Yes, I using from vis.js.
Can you help me about rewrite TimeStep prototype?
Which methods most rewrite? 


--
You received this message because you are subscribed to a topic in the Google Groups "CHAP Links Library" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/chap-links-library/Dil6TpludNI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chap-links-libr...@googlegroups.com.
To post to this group, send email to chap-link...@googlegroups.com.
Visit this group at http://groups.google.com/group/chap-links-library.
For more options, visit https://groups.google.com/d/optout.

Jos de Jong

unread,
Aug 12, 2014, 8:23:53 AM8/12/14
to chap-link...@googlegroups.com
I guess you will have to rewrite almost everything. The variables holding a Date must now hold a Jalali Date instead, and all Date methods (like getHours, getMonth, format, etc) must be replaced with their Jalali equivalents.

Sayed Abolfazl Fatemi

unread,
Aug 12, 2014, 10:36:03 AM8/12/14
to chap-link...@googlegroups.com
Thank you very much.


On Tue, Aug 12, 2014 at 4:53 PM, Jos de Jong <j...@almende.org> wrote:
I guess you will have to rewrite almost everything. The variables holding a Date must now hold a Jalali Date instead, and all Date methods (like getHours, getMonth, format, etc) must be replaced with their Jalali equivalents.

--

Jos de Jong

unread,
Aug 12, 2014, 10:43:00 AM8/12/14
to chap-link...@googlegroups.com
you're welcome, good luck with it.

محمدحسین اله‌دادیان

unread,
Jun 14, 2018, 5:48:24 AM6/14/18
to CHAP Links Library
Hi
?Did you succeed to make VIS timeline supporting Jalali calendar
?I have the same problem , would you mind giving me your code
Thanks

در سه‌شنبه 12 اوت 2014، ساعت 19:06:03 (UTC+4:30)، Sayed Abolfazl Fatemi نوشته:
Thank you very much.


On Tue, Aug 12, 2014 at 4:53 PM, Jos de Jong <j...@almende.org> wrote:
I guess you will have to rewrite almost everything. The variables holding a Date must now hold a Jalali Date instead, and all Date methods (like getHours, getMonth, format, etc) must be replaced with their Jalali equivalents.

-- 
You received this message because you are subscribed to a topic in the Google Groups "CHAP Links Library" group.
To unsubscribe from this group and all its topics, send an email to chap-links-library+unsub...@googlegroups.com.
Message has been deleted

mehdi kamani

unread,
Dec 23, 2019, 1:13:59 PM12/23/19
to CHAP Links Library
Hi.
did you find a way for that? may I have you code?
Reply all
Reply to author
Forward
0 new messages