Date
[ class tree: Date ] [ index: Date ] [ all elements ]

File: Span.php

Source Location: /Date-1.5.0a4/Date/Span.php

Classes:

Date_Span
Generic time span handling class for PEAR

Page Details:

Generic time span handling class for PEAR

PHP versions 4 and 5

LICENSE:

Copyright (c) 1997-2005 Leandro Lucarella, Pierre-Alain Joye All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted under the terms of the BSD License.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Includes:

require_once(Date.php) [line 50]
Get the Date class
require_once('Date/Calc.php') [line 55]
Get the Date_Calc class

DATE_SPAN_INPUT_FORMAT_NNSV [line 84]

DATE_SPAN_INPUT_FORMAT_NNSV = 1
Non Numeric Separated Values (NNSV) Input Format

Input format guessed from something like this:

days<sep>hours<sep>minutes<sep>seconds

Where '<sep>' is any quantity of non numeric chars. If no values are given, time span is set to zero, if one value is given, it is used for hours, if two values are given it's used for hours and minutes and if three values are given, it is used for hours, minutes and seconds.

Examples:

  • "" -> 0, 0, 0, 0 (days, hours, minutes, seconds)
  • "12" -> 0, 12, 0, 0
  • "12.30" -> 0, 12, 30, 0
  • "12:30:18" -> 0, 12, 30, 18
  • "3-12-30-18" -> 3, 12, 30, 18
  • "3 days, 12-30-18" -> 3, 12, 30, 18
  • "12:30 with 18 secs" -> 0, 12, 30, 18


[ Top ]



Documentation generated on Mon, 11 Mar 2019 15:55:01 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.