bobolounna / restfb

Automatically exported from code.google.com/p/restfb
0 stars 0 forks source link

User.getBirthdayAsDate() always returns null #203

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Retrieve list of friends as "Users"
2.Invoke the getBirthdayAsDate() method.

What is the expected output? What do you see instead?
Expect User's birthday typed into java.util.date, obtain a null instead.

What version of the product are you using? On what operating system?
1.6.11, MS Win Professional

Please provide any additional information below.
The getBirthday()method returns the date correctly as a String (E.g March 9, 
August 7, 1986 etc). 
On debugging, I found that the check getBirthday().split("/").length < 2 in 
getBirthdayAsDate() always holds good and the method consequently returns null.

Original issue reported on code.google.com by dazzlerc...@gmail.com on 2 Mar 2013 at 7:23

GoogleCodeExporter commented 8 years ago
The date information cannot be automatically parsed into a java.util.Date in 
cases where FB returns a totally freeform string, e.g. March 9.  Recall that a 
java.util.Date is just the milliseconds since the epoch.  Without year 
information, it's impossible to construct a date just thinking about it 
logically.  Further, FB has no documentation for the freeform date field so 
writing parsing code will probably be painful/error-prone.  

Original comment by m...@xmog.com on 4 Mar 2013 at 4:24