Introduction
  • 09 Apr 2021
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Introduction

  • Dark
    Light
  • PDF

Article Summary

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.

NameDescriptionUWPWebAvatars
nowReturns the current date and time in local (host device) formatYesYesYes
nowUtcReturns the current date and time in UTC formatYesYesYes
dateReturns the current date in local (host device) formatYesYesYes
dateUtcReturns the current date in UTC formatYesYesYes
dateTextReturns the current date in Text-based, MM/dd/yyyy formatYesYesYes
timeReturns the current time in local (host device) formatYesYesYes
timeUtcReturns the current time in UTC formatYesYesYes
time12TextReturns the current time in Text-based, 12-hour formatYesYesYes
time24TextReturns the current time in Text-based, 24-hour formatYesYesYes

Functions

Below is a list of functions supported by this object.

NameDescriptionUWPWebAvatars
newIdCreates and returns a new, globally unique identifier (GUID)YesYesYes
formatApplies a text formatting expression to an objectYesYesYes
seriesConverts an array of Json objects into a new array of Json objects that represents a data seriesYesYesYes
minMaxRestricts a specified numeric value to a specified numeric rangeYesYesYes
findByScaleFinds an item in an array whose value is closest to specified value without going overYesYesYes
findByRangeFinds an item in an array whose range includes a specified valueYesYesYes
addYearsAdds or subtracts a specified # of years from the current dateYesYesYes
addMonthsAdds or subtracts a specified # of months from the current dateYesYesYes
addDaysAdds or subtracts a specified # of days from the current dateYesYesYes
addHoursAdds or subtracts a specified # of hours from the current timeYesYesYes
addMinutesAdds or subtracts a specified # of minutes from the current timeYesYesYes
addSecondsAdds or subtracts a specified # of seconds from the current timeYesYesYes
addMillisecondsAdds or subtracts a specified # of milliseconds from the current timeYesYesYes

Remarks

None.


What's Next