Changeset 47 for trunk


Ignore:
Timestamp:
Dec 21, 2019, 2:18:20 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Improved meet item age and height analysis.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Meet/Meet.php

    r46 r47  
    170170  $Text = strtolower($Text);
    171171  $Result = GetNumberAfterText($Text, 'je mi');
     172  if ($Result == '') $Result = GetNumberAfterText($Text, 'je mi přes');
    172173  if ($Result == '') $Result = GetNumberBeforeText($Text, 'let');
    173174  if ($Result == '') $Result = GetNumberBeforeText($Text, 'rokov');
     175  if ($Result == '') $Result = GetNumberBeforeText($Text, 'roků');
    174176  if ($Result == '') $Result = GetNumberBeforeText($Text, 'letou');
    175177  if ($Result == '') $Result = GetNumberAfterText($Text, 'čerstvých');
     
    184186  }
    185187  if ($Result == '') {
     188    $Year = GetNumberAfterText($Text, 'ročník:');
     189    if ($Year != '') $Result = date('Y', time()) - $Year;
     190  }
     191  if ($Result == '') {
    186192    $Year = GetNumberAfterText($Text, 'narozen roku');
    187193    if ($Year != '') $Result = date('Y', time()) - $Year;
     194  }
     195  if ($Result == '') {
     196    $Year = GetNumberAfterText($Text, 'narozena roku');
     197    if ($Year != '') $Result = date('Y', time()) - $Year;
     198  }
     199  if ($Result == '') {
     200    $Result = GetNumberAfterText($Text, 'věk');
    188201  }
    189202  return $Result;
Note: See TracChangeset for help on using the changeset viewer.