Hi all, In Iran we use a calendar different from Gergorian and Islamic calendars; it's called Jalali calendar[1]. The people in Afghanistan use the same calendar but with different month names. So, I was wondering how can I implement this calendar in Pharo? I've already done the conversion routines in Python[2] but that is nowhere near a real calendar. What I have in mind is a subclass (?) of `Date` which seamlessly supports all `Date` operations but using a different calendar system. I'd appreciate any hits/pointers. TIA, -- Bahman Movaqar (http://BahmanM.com) ERP Evaluation, Implementation & Deployment Consultant PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
On Tue, 2013-06-25 at 20:16 +0400, Bahman Movaqar wrote:
Hi all,
In Iran we use a calendar different from Gergorian and Islamic calendars; it's called Jalali calendar[1]. The people in Afghanistan use the same calendar but with different month names.
So, I was wondering how can I implement this calendar in Pharo? I've already done the conversion routines in Python[2] but that is nowhere near a real calendar. What I have in mind is a subclass (?) of `Date` which seamlessly supports all `Date` operations but using a different calendar system.
Oops! Forgot the links :-) [1] http://en.wikipedia.org/wiki/Solar_Hijri_calendar [2] https://github.com/bahmanm/persianutils -- Bahman Movaqar (http://BahmanM.com) ERP Evaluation, Implementation & Deployment Consultant PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
Bahman, there has been a very powerful calendar/time library called Chronos. It was initially written for VisualWorks, but IIRC was also ported to Squeak and Pharo. The project's home page is not working any more (links to some arabic stuff which I can't read), but you can start research here: http://chronos-st.blogspot.de I am not sure it supports Jalali, but it's very likely it gives you all that's needed to implement it on top of Chronos. HTH Joachim Am 25.06.13 18:16, schrieb Bahman Movaqar:
Hi all,
In Iran we use a calendar different from Gergorian and Islamic calendars; it's called Jalali calendar[1]. The people in Afghanistan use the same calendar but with different month names.
So, I was wondering how can I implement this calendar in Pharo? I've already done the conversion routines in Python[2] but that is nowhere near a real calendar. What I have in mind is a subclass (?) of `Date` which seamlessly supports all `Date` operations but using a different calendar system.
I'd appreciate any hits/pointers.
TIA,
Well that's annoying that the http://chronos-st.org site is gone. I'll see if Alan Lovejoy has plans for its content someplace else. I'm using Chronos on both Pharo and Gemstone. I have not uploaded the changes requires for pharo2 to squeaksource. Let me know if that is desirable and I can re-prioritize. Paul On 06/25/2013 09:27 AM, jtuchel@objektfabrik.de wrote:
Bahman,
there has been a very powerful calendar/time library called Chronos. It was initially written for VisualWorks, but IIRC was also ported to Squeak and Pharo.
The project's home page is not working any more (links to some arabic stuff which I can't read), but you can start research here: http://chronos-st.blogspot.de
I am not sure it supports Jalali, but it's very likely it gives you all that's needed to implement it on top of Chronos.
HTH
Joachim
Am 25.06.13 18:16, schrieb Bahman Movaqar:
Hi all,
In Iran we use a calendar different from Gergorian and Islamic calendars; it's called Jalali calendar[1]. The people in Afghanistan use the same calendar but with different month names.
So, I was wondering how can I implement this calendar in Pharo? I've already done the conversion routines in Python[2] but that is nowhere near a real calendar. What I have in mind is a subclass (?) of `Date` which seamlessly supports all `Date` operations but using a different calendar system.
I'd appreciate any hits/pointers.
TIA,
Paul DeBruicker wrote
Well that's annoying that the http://chronos-st.org site is gone
It looks like the domain expired earlier this year. For now, you can go to http://web.archive.org/web/20130121220237/http://www.chronos-st.org/ Paul DeBruicker wrote
I have not uploaded the changes requires for pharo2 to squeaksource. Let me know if that is desirable and I can re-prioritize.
Better to ss3 or (more popularly) sthub when you get around to it. sqs's days are numbered... ----- Cheers, Sean -- View this message in context: http://forum.world.st/How-To-Implement-A-New-Calendar-tp4695122p4695168.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
have a look at aconcagua and chronos (probably chronos is better for your task). Stef On Jun 25, 2013, at 6:16 PM, Bahman Movaqar <Bahman@BahmanM.com> wrote:
Hi all,
In Iran we use a calendar different from Gergorian and Islamic calendars; it's called Jalali calendar[1]. The people in Afghanistan use the same calendar but with different month names.
So, I was wondering how can I implement this calendar in Pharo? I've already done the conversion routines in Python[2] but that is nowhere near a real calendar. What I have in mind is a subclass (?) of `Date` which seamlessly supports all `Date` operations but using a different calendar system.
I'd appreciate any hits/pointers.
TIA, -- Bahman Movaqar (http://BahmanM.com)
ERP Evaluation, Implementation & Deployment Consultant PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
participants (5)
-
Bahman Movaqar -
jtuchel@objektfabrik.de -
Paul DeBruicker -
Sean P. DeNigris -
Stéphane Ducasse