public method TimeframeUnit.toString

Overview

Takes an integer input representing a time frame unit and returns a string representation of that unit. If the input value matches one of the predefined constants in the class, the function returns the corresponding string representation. If the input value does not match any of the predefined constants, the function returns 'unknown'. This function is useful for displaying time values in a human-readable format

Declaration

function toString(unit)
public static String toString(int unit);
public static string toString(int unit);

Parameters

Name Description
unit An integer value that represents a time frame unit

Returns

The method returns a string that represents a time frame unit

Details

Declared in TimeframeUnit