Changeset 20 for trunk/Import/Amblar.php
- Timestamp:
- Dec 26, 2018, 11:55:16 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Import/Amblar.php
r17 r20 53 53 else $MeetItem->Gender = Gender::Male; 54 54 $MeetItem->Name = trim(GetTextBetween($Item, '<span class="dwqa-author">', '</span>')); 55 $Type = trim(GetTextBetween($Item, ' ', ' ')); 56 if ($Type == 'odpovězeno') continue; 55 57 $MeetItem->Date = trim(GetTextBetween($Item, '<span class="dwqa-date">', '</span>')); 56 if ($MeetItem->Date == 'před 1 dní') $MeetItem->Date = strtotime("-1 days"); 57 else if ($MeetItem->Date == 'před 2 dny') $MeetItem->Date = strtotime("-2 days"); 58 else $MeetItem->Date = HumanDateToTime($MeetItem->Date); 58 if (mb_substr($MeetItem->Date, 0, 4) == 'před') 59 { 60 $Parts = explode(' ', $MeetItem->Date); 61 if ($Parts[2] == 'hours') $MeetItem->Date = strtotime("-".$Parts[1]." hours"); 62 else if ($Parts[2] == 'dní') $MeetItem->Date = strtotime("-".$Parts[1]." days"); 63 else if ($Parts[2] == 'dny') $MeetItem->Date = strtotime("-".$Parts[1]." days"); 64 } else $MeetItem->Date = HumanDateToTime($MeetItem->Date); 59 65 $MeetItem->Email = ''; 60 66 $MeetItem->Message = '';
Note:
See TracChangeset
for help on using the changeset viewer.