Enterprise Tookit for Acrobat Products > Mobile > (Android | iOS)

JavaScript for Acrobat Reader Mobile API Reference (Android)

HOME | util Class

A static JavaScript object that defines a number of utility methods and convenience functions for string and date formatting and parsing.

Methods

getDayString

(
  • index
  • abbreviated
)
String private

Defined in Util.js:267

Returns the day string for the given index.

Parameters:

  • index Number

    The index of the day. For e.g. 1 for Sunday.

  • abbreviated Boolean

    Specifies if the abbreviated string is to be returned or the entire string.

Returns:

String:

The day string for the index.

getFormattedComponentValue

(
  • date
  • match
)
String private

Defined in Util.js:126

Returns formatted date component.

Parameters:

  • date Object

    The date object.

  • match String

    The component match found in the format string.

Returns:

String:

Formatted date component.

getFormattedComponentValue

(
  • cSource
  • match
)
String private

Defined in Util.js:427

Returns formatted component value.

Parameters:

  • cSource String

    The source string.

  • match String

    The component match found in the format string.

Returns:

String:

Formatted component value.

getMonthString

(
  • index
  • abbreviated
)
String private

Defined in Util.js:300

Returns the month string for the given index.

Parameters:

  • index Number

    The index of the day. For e.g. 1 for January.

  • abbreviated Boolean

    Specifies if the abbreviated string is to be returned or the entire string.

Returns:

String:

The month string for the index.

isNullOrUndefined

(
  • value
)
Boolean private

Defined in Util.js:584

Checks if the value is either null or undefined.

Parameters:

  • value Any

    The value which is to be tested.

Returns:

Boolean:

True if value is null or undefined, otherwise false.

lpad

(
  • value
  • width
)
String private

Defined in Util.js:552

Adds left pad to value.

Parameters:

  • value Number

    The value to be left padded.

  • width Number

    The width in characters of the final string.

Returns:

String:

Left padded value.

printd

(
  • cFormat
  • oDate
)
String

Defined in Util.js:54

Returns a date using a specified format.

Parameters:

  • cFormat String

    A string that is a pattern of supported substrings that are place-holders for date and time data.

  • oDate Object

    A Date object to format.

Returns:

String:

The formatted date string.

printf

(
  • cFormat
  • [arguments]
)
String

Defined in Util.js:28

Formats one or more arguments as a string according to a format string. It is similar to the C function of the same name.

Parameters:

  • cFormat String

    The format string to use.

  • [arguments] Any optional

    The optional arguments(s) that contain the data to be inserted in place of the % tags specified in the first parameter, the format string. The number of optional arguments must be the same as the number of % tags.

Returns:

String:

A result string formatted as specified.

printx

(
  • cFormat
  • cSource
)
String

Defined in Util.js:377

Formats a source string, cSource, according to a formatting string, cFormat.

Parameters:

  • cFormat String

    The formatting string to use.

  • cSource String

    The source string to use.

Returns:

String:

The formatted string.

validateInput

() Boolean private

Defined in Util.js:517

Does input validation for printx method.

Returns:

Boolean:

True if input is valid, otherwise false.

validateInput

() Boolean private

Defined in Util.js:334

Does input validation for printd method.

Returns:

Boolean:

True if input is valid, otherwise false.


© 2013-15 Adobe Systems, Inc. All rights reserved. Use of these APIs including, the download of software, submission of comments, ideas, feature requests and techniques, and Adobe's rights to use such submitted materials, is governed by the Adobe.com Terms of Use and the Adobe Privacy Policy.