|I created this page to share various projects and ideas related to Java programming on the Palm Pilot. I hope its content is beneficial to its readers. I have not contributed to this page in several years. Currently the content is static.|
When I was brand new to KVM I soon discovered its lack of date support. So my first project was a VERY basic Date class.
The Date class is possible because it only uses add/subtract for long values. It has some limitations, all of which are, IMHO, minor:
|Only dates after the epoch
(1/1/1970) are supported.
||There are no TimeZones (I can't
find any support of time zones for the palmOS)
||No set*() methods are supported
except for setTime(long millis). |
Four constructor types are now supported:
Date(), Date(long millis), Date(year, month, dat), Date(year, month, date, hour, min, sec)Supported methods:
long getTime(), int getYear(), int getMonth(), int getDate(), int getDay(), int getHours(), int getMinutes(), int getSeconds(), int getMillis(), viod setTime(long millis), boolean before(Date), boolean after(Date), boolean equals(Date), int compareTo(Date), int compareTo(Object), toString()I'd like to see some numeric formatting classes - anyone working on this?
Other project sites: Wes' MindStorms Page