- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Description
The tools object provides a collection of general purpose tools that can be useful during app development and testing.
Properties
Below is a list of properties supported by this object.
Name | Description | UWP | Web | Avatars |
---|---|---|---|---|
now | Returns the current date and time in local (host device) format | Yes | Yes | Yes |
nowUtc | Returns the current date and time in UTC format | Yes | Yes | Yes |
date | Returns the current date in local (host device) format | Yes | Yes | Yes |
dateUtc | Returns the current date in UTC format | Yes | Yes | Yes |
dateText | Returns the current date in Text-based, MM/dd/yyyy format | Yes | Yes | Yes |
time | Returns the current time in local (host device) format | Yes | Yes | Yes |
timeUtc | Returns the current time in UTC format | Yes | Yes | Yes |
time12Text | Returns the current time in Text-based, 12-hour format | Yes | Yes | Yes |
time24Text | Returns the current time in Text-based, 24-hour format | Yes | Yes | Yes |
Functions
Below is a list of functions supported by this object.
Name | Description | UWP | Web | Avatars |
---|---|---|---|---|
newId | Creates and returns a new, globally unique identifier (GUID) | Yes | Yes | Yes |
format | Applies a text formatting expression to an object | Yes | Yes | Yes |
series | Converts an array of Json objects into a new array of Json objects that represents a data series | Yes | Yes | Yes |
minMax | Restricts a specified numeric value to a specified numeric range | Yes | Yes | Yes |
findByScale | Finds an item in an array whose value is closest to specified value without going over | Yes | Yes | Yes |
findByRange | Finds an item in an array whose range includes a specified value | Yes | Yes | Yes |
addYears | Adds or subtracts a specified # of years from the current date | Yes | Yes | Yes |
addMonths | Adds or subtracts a specified # of months from the current date | Yes | Yes | Yes |
addDays | Adds or subtracts a specified # of days from the current date | Yes | Yes | Yes |
addHours | Adds or subtracts a specified # of hours from the current time | Yes | Yes | Yes |
addMinutes | Adds or subtracts a specified # of minutes from the current time | Yes | Yes | Yes |
addSeconds | Adds or subtracts a specified # of seconds from the current time | Yes | Yes | Yes |
addMilliseconds | Adds or subtracts a specified # of milliseconds from the current time | Yes | Yes | Yes |
Remarks
None.