Timespan Online Manual (HTML)

Usage: timespan [Input/Output Options] [Answer Options] [Operation]

 

Input/Output Options
Short form Long form Explanation
-H --help Show basic usage information and exit.
-v --version Show version information and exit.
-ee --nous Input of dates will be interpreted in non-US format; Output of dates will be in non-US format. This is equivalent to using both -ei and -eo together.
-ei --nousin Input of dates will be interpreted in non-US format.
-eo --nousout Output of dates will be in non-US format.
-l --long Output any dates in long format (using words for months instead of numbers--for example, January instead of 1).
-e --extraline Output a blank line at the end of each operation. This is particularly useful for "batch" operations using files, as it will separate each set of answers with blank lines.
 
Answer Options
-a --all Enables all Answer Options. This is equivalent to using "-t -d -h -m -s" in the command.
-t --date Give a date as one answer. This works only with the epoch and now Operations. This calculates the date based on relevant info given in the command.
-d --days Give a calculated number of days as an answer. This is the default answer, but will be overridden when ANY Answer Option is specified.
-h --hours Give a calculated number of hours as an answer.
-m --minutes Give a calculated number of minutes as an answer.
-s --seconds Give a calculated number of seconds as an answer.
 
Operations
Name Usage Explanation
epoch epoch [+ number unit] Arguments to "epoch" are optional, but if any are given, exactly three must be given. The + sign must be the first argument after epoch, because currently time can be added to the epoch but not subtracted from it, although this may be supported in the future. number and unit are explained below. When no arguments are supplied after "epoch", the epoch's date is displayed. The epoch is defined as January 1, 1970 (1 January 1970 for those preferring that form). Time may be added in the supported units.
now now [{+|-} number unit] Arguments to "now" are optional, but if any are given, exactly three must be given. The + or - sign must be the first argument after "now", as timespan must know what you want to do. Time may be either subtracted from or added to "now&qout; in the supported units. number and unit are explained below. When no arguments are supplied after "now", the current date is displayed. All calculations using "now" are based on the epoch; therefore, subtracting a larger value than the amount of time "now" is after the epoch is not supported. For example, if "now" is 20000 days after the epoch, no value larger than 20000 days (or its equivalent in other units) may be subtracted.
between ... and between date 1 and date 2 Caclulates time between date 1 and date 2. The "and" is required. The keywords "epoch" and "now" may be used to replace date 1 or date 2, however, the same keyword may not replace both dates. Date formats are explained below; each date is three arguments. Examples of each of the six possible combinations of dates and keywords to use "between" are included in the EXAMPLES section below.

 


EXAMPLES:

Here are some usage examples:


NOTES:


BUGS:

Daylight Savings Time is not taken into account. Therefore, hour counts may be high by 1, minute counts by 60, and second counts by 3600. The maintainer has no intention of fixing this bug himself, because it is timezone specific--not all timezones use Daylight Savings Time. 100% precision with units of time smaller than one day have never been the goal of the project.

To submit bug reports, visit the SourceForge.net project page and click the Bugs link near the top center of the page.

Patches are always welcome, even for bugs the maintainer has no intention of fixing. Patches will be reviewed and accepted or denied. Please use the SourceForge Patches tracker to submit patches, as it provides a method of tracking the history of submitted patches.