mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: vBulletin bulk importer
This commit is contained in:
parent
d9696c98c3
commit
57d6a5dc9c
2 changed files with 4 additions and 3 deletions
|
@ -360,7 +360,8 @@ class BulkImport::VBulletin < BulkImport::Base
|
|||
|
||||
def parse_birthday(birthday)
|
||||
return if birthday.blank?
|
||||
date_of_birth = Date.strptime(birthday, "%m-%d-%Y")
|
||||
date_of_birth = Date.strptime(birthday.gsub(/[^\d-]+/, ""), "%m-%d-%Y") rescue nil
|
||||
return if date_of_birth.nil?
|
||||
date_of_birth.year < 1904 ? Date.new(1904, date_of_birth.month, date_of_birth.day) : date_of_birth
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue