Bienvenue, Invité
Nom d'utilisateur : Mot de passe :
Before asking for help please read "How to request help" by clicking on that tab above here.
  • Page :
  • 1

SUJET :

Lunar age! il y a 1 semaine 6 heures #1

  • ngohuuthuan
  • Portrait de ngohuuthuan Auteur du sujet
  • Hors Ligne
  • New
  • New
  • Messages : 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!

Connexion ou Créer un compte pour participer à la conversation.

Lunar age! il y a 1 semaine 5 heures #2

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrator
  • Administrator
  • Messages : 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 - Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. - fisharebest.webtrees.net

Connexion ou Créer un compte pour participer à la conversation.

Lunar age! il y a 1 semaine 5 heures #3

  • ngohuuthuan
  • Portrait de ngohuuthuan Auteur du sujet
  • Hors Ligne
  • New
  • New
  • Messages : 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!

Connexion ou Créer un compte pour participer à la conversation.

Lunar age! il y a 1 semaine 5 heures #4

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrator
  • Administrator
  • Messages : 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 - Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. - fisharebest.webtrees.net

Connexion ou Créer un compte pour participer à la conversation.

Lunar age! il y a 1 semaine 4 heures #5

  • ngohuuthuan
  • Portrait de ngohuuthuan Auteur du sujet
  • Hors Ligne
  • New
  • New
  • Messages : 4
Thank you!
Hope you will implement this algorithm soon!
Anyway, I am very happy with the current version of webtrees!

Connexion ou Créer un compte pour participer à la conversation.

Lunar age! il y a 1 semaine 4 heures #6

  • ngohuuthuan
  • Portrait de ngohuuthuan Auteur du sujet
  • Hors Ligne
  • New
  • New
  • Messages : 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

Connexion ou Créer un compte pour participer à la conversation.

  • Page :
  • 1
Propulsé par Kunena