Changeset 362 for trunk/lib/Utilities.inc.php
- Timestamp:
- Nov 5, 2009 5:16:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Utilities.inc.php
r361 r362 1 1 <?php 2 2 /** 3 * The Strangecode Codebase - a general application development framework for PHP 4 * For details visit the project site: <http://trac.strangecode.com/codebase/> 5 * Copyright 2001-2009 Strangecode Internet Consultancy 6 * 7 * This file is part of The Strangecode Codebase. 8 * 9 * The Strangecode Codebase is free software: you can redistribute it and/or 10 * modify it under the terms of the GNU General Public License as published by the 11 * Free Software Foundation, either version 3 of the License, or (at your option) 12 * any later version. 13 * 14 * The Strangecode Codebase is distributed in the hope that it will be useful, but 15 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 17 * details. 18 * 19 * You should have received a copy of the GNU General Public License along with 20 * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>. 21 */ 22 23 /** 3 24 * Utilities.inc.php 4 * Code by Strangecode :: www.strangecode.com :: This document contains copyrighted information5 25 */ 6 26 … … 294 314 * @param int $format The return string format 295 315 * @author Aidan Lister <aidan@php.net> 296 * @version 1.1.0 316 * @author Quinn Comendant <quinn@strangecode.com> 317 * @version 1.2.0 297 318 */ 298 319 function humanFileSize($size, $format='%01.2f %s', $max_unit=null, $multiplier=1024) … … 351 372 'year' => array(31556926.08, _("year"), _("years")), 352 373 'decade' => array(315569260.8, _("decade"), _("decades")), 374 'century' => array(3155692608, _("century"), _("centuries")), 353 375 ); 354 376 355 377 // Max unit to calculate. 356 $max_unit = isset($units[$max_unit]) ? $max_unit : ' decade';378 $max_unit = isset($units[$max_unit]) ? $max_unit : 'year'; 357 379 358 380 $final_time = $seconds;
Note: See TracChangeset
for help on using the changeset viewer.