This type contains all values accepted when configuring numeric notations.
This type defines functions used by time writers in order to express a numeric value in the form of text.
The first parameter is a native number and the second, optional, is a big decimal.
A union type, used by parameters that accept either the name of a time unit or a time unit object.
A union type, used by parameters that accept either the name of a time unit or a time unit object.
The accepted names are the properties defined by TimeUnitDatabase, but case-insensitive and plural variations are also valid (even though TypeScript would not allow it).
This type is a union of all accepted types that can be used to represent a time value: a string that parses to a number (e.g. "1000" or "1e-10"), a big decimal or a number.
Alias to TimeUnits.
Writes a numeric value using numerals from the Ancient Rome.
A number or big decimal to be converted to roman.
Whether to include common fractions or not.
A string with the roman representation of the given number.
Writes the fraction part of a numeric value using common fractions from the Ancient Rome.
A number that will have its decimal part extracted and written in roman.
A string with the roman representation of the given fraction.
Objects pertaining to this constant can be used as a parameter value for the countdown method of time writers.
These constants contains groups of time units that are related.
All base ten SI time units.
All base two binary time units.
Common time unit segmentation: year, month, day, hour, minute and second.
Extremes and the middle-point of timecount units: Planck time, nanosecond and yobisecond.
Contains all units of a sidereal time.
A database of time units, used to qualify and describe lengths of time.
Each property of this object enumerates the linguistic and mathematical features of the time unit it represents.
See TimeUnitDatabase for more information about time units.
Generated using TypeDoc
This is the main module of timecount. Employ one of the following snippets to use it in your project:
import { Time, TimeWriter } from "timecount";
var timecount = require("timecount");
This module contains the time encapsulation used throughout the project and the implementation for outputting synthetic time value strings (time writers). It relies on big.js for the precision of its floating-point operations, specially considering how JS handles these things.
It also exports both other modules, localization and utils, as properties of itself, so they can be easily accessed when importing timecount as a whole:
var timecount = require("timecount"); // Accessing sub-modules directly: timecount.Locale.set("es-mx"); var timer = new timecount.utils.Timer();