This is an android widget to show today lunar date and display moon phase on your desktop. You can found this useful if you a really Buddhist who looking 1st and mid moon for praying god or, those vegetarian take vege on 1st and mid moon only.

I take the moon graphic from then use Gimp to cut the moon shape which I want then convert all 28 days of moon day into .png so it can be use as resource in the app.

Currently a very not smart way of getting lunar date and 24 solar terms. However, I’ll try to update it in future. I create a datasheet (.xml) to store every first of lunar month with the corresponding Gregorian date, and using loop method to calculate today lunar value. Welcome any better solution to do this. Thanks.

This is the sample of the datasheet (.xml)

<?xml version="1.0" encoding="UTF-8"?>
<!-- @see -->
<!-- @see -->
	<lunar sun="2011-11-08" month="11" />
	<lunar sun="2011-11-25" term="立冬" />
	<lunar sun="2011-11-23" term="小雪" />
	<lunar sun="2011-12-22" term="冬至" />
	<lunar sun="2011-12-15" month="12" />
	<lunar sun="2012-01-23" month="1" />
	<lunar sun="2012-02-04" term="立春" />
	<lunar sun="2012-02-19" term="雨水" />
	<lunar sun="2012-02-22" month="2" />
	<lunar sun="2012-03-05" term="惊蛰" />
	<lunar sun="2012-03-21" term="春分" />
	<lunar sun="2012-03-22" month="3" />
	<lunar sun="2012-04-04" term="清明" />
	<lunar sun="2012-04-20" term="谷雨" />
	<lunar sun="2012-04-21" month="4" />
	<lunar sun="2012-05-05" term="立夏" />
	<lunar sun="2012-05-20" term="小满" />
	<lunar sun="2012-05-21" month="4" />
	<lunar sun="2012-06-05" term="芒种" />
	<lunar sun="2012-06-19" month="5" />
	<lunar sun="2012-06-21" term="夏至" />
	<lunar sun="2012-07-07" term="小暑" />
	<lunar sun="2012-07-19" month="6" />
	<lunar sun="2012-07-22" term="大暑" />
	<lunar sun="2012-08-07" term="立秋" />
	<lunar sun="2012-08-17" month="7" />
	<lunar sun="2012-08-23" term="处暑" />
	<lunar sun="2012-09-07" term="白露" />
	<lunar sun="2012-09-16" month="8" />
	<lunar sun="2012-09-22" term="秋分" />
	<lunar sun="2012-10-08" term="寒露" />
	<lunar sun="2012-10-15" month="9" />
	<lunar sun="2012-10-23" term="霜降" />
	<lunar sun="2012-11-07" term="立冬" />
	<lunar sun="2012-11-14" month="10" />
	<lunar sun="2012-11-22" term="小雪" />
	<lunar sun="2012-12-07" term="大雪" />
	<lunar sun="2012-12-13" month="11" />
	<lunar sun="2012-12-21" term="冬至" />
	<lunar sun="2013-01-05" term="小寒" />
	<lunar sun="2013-01-12" month="12" />
	<lunar sun="2013-01-20" term="大寒" />




4 thoughts on “MoonWidget

  1. The missing part of moon looks correct but it’s not correct at the side. The view from different location will look different, it should be depends on longitude. For example, at Malaysia, the shaddow part should begin at bottom instead from right to left.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s