Changeset 47733 for trunk/src/wp-includes/SimplePie/Parse/Date.php
- Timestamp:
- 05/01/2020 02:24:42 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/SimplePie/Parse/Date.php
r46260 r47733 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, GeoffreySneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * … … 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 * @author GeoffreySneddon38 * @author Sam Sneddon 40 39 * @author Ryan McCue 41 40 * @link http://simplepie.org/ SimplePie … … 100 99 // German 101 100 'montag' => 1, 101 'mo' => 1, 102 102 'dienstag' => 2, 103 'di' => 2, 103 104 'mittwoch' => 3, 105 'mi' => 3, 104 106 'donnerstag' => 4, 107 'do' => 4, 105 108 'freitag' => 5, 109 'fr' => 5, 106 110 'samstag' => 6, 111 'sa' => 6, 107 112 'sonnabend' => 6, 113 // AFAIK no short form for sonnabend 114 'so' => 7, 108 115 'sonntag' => 7, 109 116 // Italian … … 147 154 'Σαβ' => 6, 148 155 'Κυρ' => 7, 156 // Russian 157 'Пн.' => 1, 158 'Вт.' => 2, 159 'Ср.' => 3, 160 'Чт.' => 4, 161 'Пт.' => 5, 162 'Сб.' => 6, 163 'Вс.' => 7, 149 164 ); 150 165 … … 174 189 'august' => 8, 175 190 'sep' => 9, 176 'september' => 8,191 'september' => 9, 177 192 'oct' => 10, 178 193 'october' => 10, … … 209 224 // German 210 225 'januar' => 1, 226 'jan' => 1, 211 227 'februar' => 2, 228 'feb' => 2, 212 229 'märz' => 3, 230 'mär' => 3, 213 231 'april' => 4, 214 'mai' => 5, 232 'apr' => 4, 233 'mai' => 5, // no short form for may 215 234 'juni' => 6, 235 'jun' => 6, 216 236 'juli' => 7, 237 'jul' => 7, 217 238 'august' => 8, 239 'aug' => 8, 218 240 'september' => 9, 241 'sep' => 9, 219 242 'oktober' => 10, 243 'okt' => 10, 220 244 'november' => 11, 245 'nov' => 11, 221 246 'dezember' => 12, 247 'dez' => 12, 222 248 // Italian 223 249 'gennaio' => 1, … … 291 317 'Οκτ' => 10, 292 318 'Νοέ' => 11, 293 'Δεκ' => 12, 319 'Δεκ' => 12, 320 // Russian 321 'Янв' => 1, 322 'января' => 1, 323 'Фев' => 2, 324 'февраля' => 2, 325 'Мар' => 3, 326 'марта' => 3, 327 'Апр' => 4, 328 'апреля' => 4, 329 'Май' => 5, 330 'мая' => 5, 331 'Июн' => 6, 332 'июня' => 6, 333 'Июл' => 7, 334 'июля' => 7, 335 'Авг' => 8, 336 'августа' => 8, 337 'Сен' => 9, 338 'сентября' => 9, 339 'Окт' => 10, 340 'октября' => 10, 341 'Ноя' => 11, 342 'ноября' => 11, 343 'Дек' => 12, 344 'декабря' => 12, 345 294 346 ); 295 347 … … 615 667 * @final 616 668 * @access public 617 * @param call able$callback669 * @param callback $callback 618 670 */ 619 671 public function add_callback($callback) … … 632 684 * Parse a superset of W3C-DTF (allows hyphens and colons to be omitted, as 633 685 * well as allowing any of upper or lower case "T", horizontal tabs, or 634 * spaces to be used as the time sep erator (including more than one))686 * spaces to be used as the time separator (including more than one)) 635 687 * 636 688 * @access protected … … 692 744 693 745 // Convert the number of seconds to an integer, taking decimals into account 694 $second = round( $match[6] + $match[7] / pow(10,strlen($match[7])));746 $second = round((int)$match[6] + (int)$match[7] / (10 ** strlen($match[7]))); 695 747 696 748 return gmmktime($match[4], $match[5], $second, $match[2], $match[3], $match[1]) - $timezone; 697 749 } 698 else 699 { 700 return false; 701 } 750 751 return false; 702 752 } 703 753 … … 722 772 $output .= substr($string, $position, $pos - $position); 723 773 $position = $pos + 1; 724 if ($ string[$pos - 1] !== '\\')774 if ($pos === 0 || $string[$pos - 1] !== '\\') 725 775 { 726 776 $depth++; … … 850 900 return gmmktime($match[5], $match[6], $second, $month, $match[2], $match[4]) - $timezone; 851 901 } 852 else 853 { 854 return false; 855 } 902 903 return false; 856 904 } 857 905 … … 915 963 return gmmktime($match[5], $match[6], $match[7], $month, $match[2], $match[4]) - $timezone; 916 964 } 917 else 918 { 919 return false; 920 } 965 966 return false; 921 967 } 922 968 … … 957 1003 return gmmktime($match[4], $match[5], $match[6], $month, $match[3], $match[7]); 958 1004 } 959 else 960 { 961 return false; 962 } 1005 1006 return false; 963 1007 } 964 1008 … … 976 1020 return false; 977 1021 } 978 else 979 { 980 return $strtotime; 981 } 1022 1023 return $strtotime; 982 1024 } 983 1025 } 984
Note: See TracChangeset
for help on using the changeset viewer.