Foros de discusión

Date and Month of user Birthday

thumbnail
raghuraman mg, modificado hace 15 años.

Date and Month of user Birthday

New Member Mensajes: 12 Fecha de incorporación: 16/12/08 Mensajes recientes
How to get and Display the month and date of account user's birthday?

Replay,
thumbnail
Lari Tuominen, modificado hace 15 años.

RE: Date and Month of user Birthday

Expert Mensajes: 283 Fecha de incorporación: 7/11/07 Mensajes recientes
liferay user (com.liferay.portal.model.user) has a method public Date getBirthday() that returns users birthday from contact table. Unfortunately if you are playing with liferay soap, userSoap does not carry this information.

However, it seems that from ContactService you could get this information if using soap.

- Lari
thumbnail
raghuraman mg, modificado hace 15 años.

RE: Date and Month of user Birthday

New Member Mensajes: 12 Fecha de incorporación: 16/12/08 Mensajes recientes
Lari Tuominen:
liferay user (com.liferay.portal.model.user) has a method public Date getBirthday() that returns users birthday from contact table. Unfortunately if you are playing with liferay soap, userSoap does not carry this information.

However, it seems that from ContactService you could get this information if using soap.

- Lari



Thanks Mr.Lari

I got it...

Birthday Date :
<%
Contact contact1 = null;
contact1 = user.getContact();
Calendar birthdayCal = CalendarFactoryUtil.getCalendar();
birthdayCal.setTime(contact1.getBirthday());
//out.println(contact1.getBirthday());
int birthdayDate = birthdayCal.get(Calendar.DATE);
int birthdayMonth = birthdayCal.get(Calendar.MONTH)+1;
int birthdayYear = birthdayCal.get(Calendar.YEAR);
out.println(birthdayDate+"-"+birthdayMonth+"-"+birthdayYear);

%>
dola dola, modificado hace 11 años.

RE: Date and Month of user Birthday

New Member Mensajes: 7 Fecha de incorporación: 29/12/11 Mensajes recientes
Hi,
Can i display all users birthday on new portlet?..

thanks emoticon
thumbnail
Shivaji C, modificado hace 11 años.

RE: Date and Month of user Birthday

Regular Member Mensajes: 143 Fecha de incorporación: 18/10/12 Mensajes recientes
dola dola:
Hi,
Can i display all users birthday on new portlet?..

thanks emoticon



Yes , try with calendar or dynamic data display list,hope this will helps u.


Regards,
Shivaji
dola dola, modificado hace 11 años.

RE: Date and Month of user Birthday

New Member Mensajes: 7 Fecha de incorporación: 29/12/11 Mensajes recientes
Thanks Shivaji emoticon ,,
At first i`m working with Liferay 6.0.5 , my task is "display 2 rows the first is user name and the second is birthdays of all users ".
i cannot find dynamic data display list , so i try to work on calendar . now i need to link between user birthday and calendar (birthdays of all users in the community consider event with type birthday and screen name is the title of event )
and add birthday tab in calender that display all birthdays of all users .
is there easier scenario than this to this task ?? .. can u help me ?

thanks emoticon