Changeset 31 for trunk/Import/SalsaDance.php
- Timestamp:
- Dec 30, 2018, 7:37:55 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Import/SalsaDance.php
r11 r31 22 22 $Item = GetTextBetween($Content, $ItemStart, $ItemEnd); 23 23 $MeetItem = new MeetItem(); 24 $MeetItem-> Date = trim(GetTextBetween($Item, '<span class="created">', '</span>'));25 $MeetItem-> Date = str_replace('. ', '.', $MeetItem->Date);26 if (strpos($MeetItem-> Date, 'dnes v') !== false)27 $MeetItem-> Date = str_replace('dnes v', HumanDate(time()), $MeetItem->Date);28 if (strpos($MeetItem-> Date, 'včera v') !== false)29 $MeetItem-> Date = str_replace('včera v', HumanDate(strtotime('-1 day', time())), $MeetItem->Date);30 $MeetItem-> Date = HumanDateTimeToTime($MeetItem->Date);24 $MeetItem->Time = trim(GetTextBetween($Item, '<span class="created">', '</span>')); 25 $MeetItem->Time = str_replace('. ', '.', $MeetItem->Time); 26 if (strpos($MeetItem->Time, 'dnes v') !== false) 27 $MeetItem->Time = str_replace('dnes v', HumanDate(time()), $MeetItem->Time); 28 if (strpos($MeetItem->Time, 'včera v') !== false) 29 $MeetItem->Time = str_replace('včera v', HumanDate(strtotime('-1 day', time())), $MeetItem->Time); 30 $MeetItem->Time = HumanDateTimeToTime($MeetItem->Time); 31 31 $MeetItem->Name = trim(GetTextBetween($Item, '<div class="comment-name">', '</div>')); 32 32 $MeetItem->Message = trim(GetTextBetween($Item, '<p>', '</p>'));
Note:
See TracChangeset
for help on using the changeset viewer.