Before asking for help please read "How to request help" by clicking on that tab above here.
  • Page:
  • 1

TOPIC:

Lunar age! 1 week 4 hours ago #1

  • ngohuuthuan
  • ngohuuthuan's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 4
Hello friends!
In my country, I use both lunar calendar and solar calendar (I'm from Vietnam)
When calculating the age of person A (1675-1742), the solar calendar is 67 years old. but according to the way the lunar calendar is calculated, we add another year, which is 68 years old.
Please show me how to fix the source code so I can age according to the lunar calendar.
Thank you!

Please Log in or Create an account to join the conversation.

Lunar age! 1 week 3 hours ago #2

  • fisharebest
  • fisharebest's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 13196
> In my country, I use both lunar calendar and solar calendar (I'm from Vietnam)
> Please show me how to fix the source code so I can age according to the lunar calendar.

If I understand correctly, the vietnamese lunar calendar uses the same logic as the chinese lunar calendar - but calculated from a different longitude.

There is already a feature request to add support for the chinese calendar - github.com/fisharebest/webtrees/issues/2239

But I do not yet have enough knowledge of this calendar to be able to implement it.

We need formulae to convert between julian-day numbers and day/month/year numbers.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Lunar age! 1 week 3 hours ago #3

  • ngohuuthuan
  • ngohuuthuan's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 4
Thank you for replying!
I know the lunar calendar is complex, I simply need to +1 into the calendar year. Ex: A (1675-1742) The solar calendar is 67 years old, the lunar calendar is 67 + 1 = 68 :).
Or the age of the current person B was born in 1970, the calendar is 50 years old, but the lunar calendar is 50 + 1 = 51.
In my country, do important things according to the lunar calendar!

Please Log in or Create an account to join the conversation.

Lunar age! 1 week 2 hours ago #4

  • fisharebest
  • fisharebest's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 13196
> I simply need to +1

In the lunar calendar, ages are counted from 1 at birth, rather than zero.

But the lunar calendar is more complicated than that.

In the gregorian calendar, today is the 30th day of the 6th month.

In the lunar calendar, today is the 10th day of the 5th month.

(Source: www.prokerala.com/general/calendar/chinesecalendar.php )

Because years start on different dates, your birthday will depend on the calendar, and you will add another year on different dates.

So we must convert the day/month so that we can calculate the year in the lunar calendar - and then we can add 1.
But we must do the conversion first.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Lunar age! 1 week 2 hours ago #5

  • ngohuuthuan
  • ngohuuthuan's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 4
Thank you!
Hope you will implement this algorithm soon!
Anyway, I am very happy with the current version of webtrees!

Please Log in or Create an account to join the conversation.

Lunar age! 1 week 2 hours ago #6

  • ngohuuthuan
  • ngohuuthuan's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 4
Sorry I have one more question!
Is it possible to change the Hourglass chart from top to bottom?
1. A
/ \
2. B C
/ | \ / \
3. D E F G H

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum