I’m making a dreamspell calendar for my Palm PDA. It doesn’t do much at the moment. It’ll support PalmOS 3.5 or later. I’ve searched the net for open source GPL software but can’t find anything. Hopefully that means I’ll be the first to write a free 13 moon calendar program for Palm . If anyone knows of any other program let me know. I don’t really want to re-invent the wheel.
Anyway I’ll post screenshots and code sniplets here. It seems there are a lot of programmers on this forum.
I programmed a dreamspell/date converter program and I’ll be happy to share my code with you. It’s in vb.net, however, and I’m not too sure how to program on palm-based OS’s. Let me know if I can help.
Awesome name! Sounds very catchy, I like it very much. Palmspell.
Cool, If it’s not to long you could just post it here. I’m using C because I can use freeware software tools. But it’s easy enough to convert it.
This is what I’m using at the moment. Hopefully it’ll get shorter.
//Finds the kin for 1904 + day
UInt16 GetKin(UInt32 day)
k = (day + 212 + LeapYears(day)) % 260; //Kin for today
//Returns the number of leapyears between 1904 and day/
//day is the number of days since 1904.
UInt16 LeapYears(UInt32 day)
UInt32 l, a, b, c;
a = (int)(((double)day - 59.0) / (YEAR_LEN * 4.0)); //Adds a leap year for every 4 years
b = (int)(((double)day + 1401.0) / (YEAR_LEN * 100.0)); //Subtracts a leap year for every 100 years
c = (int)(((double)day + 110974.0) / (YEAR_LEN * 400.0)); //Adds a leap year for every 400 years
l = a - b + c + 1;
here goes! The following code is from the Tzolkin Date Converter v 1.1 programmed by Tony Gulino. It is written in VB.NET 2002.
A couple of tips on the terminology
GIndex - The day of the year. January 1 corresponds to 1. If the current year is a leap year and the date is after Feb 28, the GIndex is subtracted by 1. Today has a GIndex of 83.
MIndex - The day of the 13/28 year. July 26 corresponds to 1. Today has an MIndex of 242.
HIndex - The signature index. For example, today (Yellow Rhythmic Sun) has an HIndex of 240.
MoonIndex - moon number. The Solar moon would be 9 (the tone names are also the same as the moon names).
DayIndex - day of the current moon. Today would be day 18.
ToneIndex - number from 1 to 13 that represents the tone.
TribeIndex - number from 1 to 20 that represents the tribe.
I’m sure you could get the general idea from the code below and just rewrite it in C. If you have Windows 98 or later and the .NET framework v1.1, I can send you the program so you can see more how it uses the following modules. If you need any help with the code, let me know.
yep Inchworm! My code depends greatly on the Gregorian calendar, simply because Windows (and .NET) give it a lot of functionality that I can use right out of the box. Eventually I will rewrite my code to work mostly off of moon dates and galactic signatures instead of the Gregorian date. This will probably appear in my version 1.2 of my converter program. I guess I’ll work on that sometime over my spring break, then release it on my website…
I wish you the best of luck with your program! I’m glad I could help (even though I didn’t help much )
Inchworm: in my date converter program, I programmed a duration feature. This allows the user to skip ahead or backwards a duration of:
7 days (one week)
13 days (one wavespell)
20 days (one harmonic run)
28 days (one moon)
260 days (one Tzolkin cycle)
365 days (one year)
I did this by putting a dropdown box with the above choices and having the user choose a duration, then click Back or Next.
Your program looks great! A little minor issue would be that the “Red” “Resonant” and “Dragon” are not all on the same line, but that’s more of a personal preference.
or perhaps put the kin # right under the Moon day (Solar Moon, Day 19) so that it’s to the right of the signature picture. just an idea… I think the kin # is an important feature (I’ve found uses for it after I added it to my program) so I think you’ll be better off leaving it in there, but moving it to the right of the picture.
Palms and handhelds must be the ultimate dream diaries, instant on and by the side of the bed. I can recommend dana’s www2.alphasmart.com/products/dana.html as they run palm but have the all in one keyboard and long screen, great for writers.
I use my Palm Tungsten E as a dream diary. I love my palm it was well worth the money. I’ve had it for over a year. I’m looking forward to upgrading it in another year.
Palms as dream diaries have advantages and disadvantages.
This is what I’ve found.
It’s with you all the time.
It fits under a pillow very well.
Don’t have to worry about losing a pen down the side of your bed.
Provides it’s own light.
Risks damaging your handheld. I sometimes forget to put it back under my pillow.
It’s too bright.
Text input is too slow. I have to use notepad to write dreams in. That uses a lot of space and is rather messy. Often turns out as lots of scribbles.
That’s about all I can think of. I find it good for just jotting down the main points in my dreams.
I guess as newer handhelds come out they’ll have better handwriting recognition. That’ll make it worth writing dream diary software for PDAs.
That’s for the help. All help is greatly appreciated.
I’ve got the date conversion part working. Just needed to add a date popup. It’s good enough to use but it’s not quite complete. I’ve used it to help me memorise all the tones and tribes and look up birthdays of people I know.
I’m going to put it on sourceforge. I’ve completed the program registration but probably wont be able to upload it until Wednesday or Thursday.