Chinese Lunar Calendar
Brought to you by:
canajun2eh,
yalnifj
Older Chinese people celebrate their Lunar birthday while younger Chinese people celebrate their Gregorian birthday mostly.
It would be nice to convert lunar dates to gregorian for older chinese people for their anniversaries. Bear in mind that gregorian dates changes each year for the elders.
For younger people, it is optional.
Bob, two questions:
1 - what version of PGV are you using? The next release has many improvements, including a lot of changes to the calendar funstions. I don't know if it includes anything for this issue, but it might.
2 - To make something like this work you will need to give the developers a clear definition of "Older Chinese people", When does a person become "Older"?
Dear kiwi_pgv:
I thank you for your response, currently I have PhpGedView 4.1.5 and am sure that it currently does not support Chinese lunar dates.
Whether or not a person celebrate their lunar birthday should be left as an tick box option during entry of their birth details.
If the person do celebrate lunar birthday at time of birth, then the user interface "Celebrate Lunar Birthday" check box will be selected.
If the person celebrate both the lunar birthday and their gregorian birthday at time of birth, then the user interface "Celebrate both lunar and gregorian birthday" will be checked.
By default if none of the boxes are checked then the person only celebrates their gregorian birthday.
Currently I have attained a code from http://www.china-on-site.com/flexphpsite/other.php which is able to convert a gregorian date to a chinese lunar date, but not the reverse.
When one wants to convert a chinese lunar date to a gregorian, this is how it could be done. Firstly start the gregorian calendar at the first day of the year from the entered chinese date, then keep incrementing the gregorian date until the converted chinese date matches up with the entered chinese date, then the gregorian date used during the gregorian to chinese conversion will be the desired result for chinese to gregorian conversion.
The completed gregorian to chinese and chinese to gregorian conversion php file is attached.
The next question is how can this code be utilised in anniversary conversions. It is clear that there are functions in the ./includes/date_class.php ./includes/functions_date.php ./calendar.php , however there is no simple logical path to easily integrate the attached code. Also there is the check box true false variables and user interface to be designed here.
The next stage is to have values passed to these translator functions in the code and the corresponding results be read and displayed in appropriate locations in anniversary reporting.
File Added: calendar.zip
Chinese lunar date to Gregorian AND Gregorian to Chinese lunar date (1901-2020)
I did write a long/detailed response to this. The new SF tracker deleted it.