Changeset 23
- Timestamp:
- Dec 26, 2018, 1:30:50 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Meet.php
r19 r23 9 9 include_once('Import/MajkluvSvet.php'); 10 10 include_once('Import/Csts.php'); 11 include_once('Import/Facebook.php'); 12 include_once('Import/Eso.php'); 11 13 12 14 abstract class Gender … … 32 34 { 33 35 if($DateTime == '') return(NULL); 36 $DateTime = str_replace('. ', '.', $DateTime); 34 37 $Parts = explode(' ', $DateTime); 35 38 $DateParts = explode('.', $Parts[0]); 36 $TimeParts = explode(':', $Parts[1]); 39 if (count($Parts) > 1) $TimeParts = explode(':', $Parts[1]); 40 else $TimeParts = array(0, 0, 0); 37 41 $Result = mktime($TimeParts[0], $TimeParts[1], $TimeParts[2], $DateParts[1], $DateParts[0], $DateParts[2]); 38 42 return($Result); … … 182 186 $Text = strtolower($Text); 183 187 $Result = GetNumberBeforeText($Text, 'kg'); 188 if ($Result == '') $Result = GetNumberAfterText($Text, 'vážím'); 184 189 if ($Result == '') $Result = GetAgeHeightWeightFromText($Text)[2]; 185 190 return $Result; … … 201 206 { 202 207 $Result = explode('/', $Matches[0][0]); 208 // If first number is over 100 then its probably height/weight 209 if ($Result[0] > 100) $Result = array('', $Result[0], $Result[1]); 203 210 $Result[] = ''; 204 211 } … … 276 283 else if ($Method == 'majkluvsvet') $Source = new MeetSourceMajkluvSvet(); 277 284 else if ($Method == 'csts') $Source = new MeetSourceCsts(); 285 else if ($Method == 'facebook') $Source = new MeetSourceFacebook(); 286 else if ($Method == 'eso') $Source = new MeetSourceEso(); 278 287 else { 279 288 echo('Unsupported parse method: '.$Method.'<br/>');
Note:
See TracChangeset
for help on using the changeset viewer.