Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
raghuraman mg
Date and Month of user Birthday
January 6, 2009 9:40 PM
Answer

raghuraman mg

Rank: New Member

Posts: 12

Join Date: December 16, 2008

Recent Posts

How to get and Display the month and date of account user's birthday?

Replay,
Lari Tuominen
RE: Date and Month of user Birthday
January 6, 2009 11:37 PM
Answer

Lari Tuominen

Rank: Expert

Posts: 283

Join Date: November 7, 2007

Recent Posts

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
raghuraman mg
RE: Date and Month of user Birthday
January 21, 2009 2:02 AM
Answer

raghuraman mg

Rank: New Member

Posts: 12

Join Date: December 16, 2008

Recent Posts

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
RE: Date and Month of user Birthday
November 29, 2012 4:42 AM
Answer

dola dola

Rank: New Member

Posts: 7

Join Date: December 29, 2011

Recent Posts

Hi,
Can i display all users birthday on new portlet?..

thanks emoticon
Shankar Baba
RE: Date and Month of user Birthday
November 29, 2012 5:07 AM
Answer

Shankar Baba

Rank: Regular Member

Posts: 144

Join Date: October 17, 2012

Recent Posts

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
RE: Date and Month of user Birthday
December 3, 2012 3:52 AM
Answer

dola dola

Rank: New Member

Posts: 7

Join Date: December 29, 2011

Recent Posts

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