Read the statement by Michael Teeuw here.
wrong age in calendar module
-
hi,
I´ve created google calendar as a birthday calendar. Birthday is created as an appointment (whole day, repeat every year). Start date is the birthday and year of birth.
My problem is that the display of age is a year less. So instead of 35 years old only 34 is displayed (E.g. March 22th.).

Does anyone know this problem? -
@chamaeleon82 Same here. There is a logical bug in the calculation of “yearDiff” in calendar.js line 129-130. It calculates “CurrentYear” - “FirstYear of event” instead “NextOccurrenceYear of event” - “FirstYear of event”. I’m not too familiar with js, but the fix should be something like yearDiff = event.startDate.getFullYear() - event.firstYear.
-
for me it worked by replacing in line 129:
new Date().getFullYear()
with
new Date(parseInt(event.startDate)).getFullYear()
-
thank you, will soon try.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login