Class sap.gantt.misc.FormatModule: sap/gantt/misc/Format


The Format class provides static methods for formatting dates, times, and timestamps to be used in sap.gantt

Constructor Summary
new sap.gantt.misc.Format()A dummy constructor for Format.
Method Summary
sap.gantt.misc.Format.abapTimestampToDate(sTimestamp)Converts an ABAP timestamp(eg:"20150909000000" ) into a Date instance.
sap.gantt.misc.Format.abapTimestampToTimeLabel(sTimestamp, oLocale)Converts an ABAP timestamp into a time label to be used in Gantt.
sap.gantt.misc.Format.dateToAbapTimestamp(oDate)Converts a Date instance into an ABAP timestamp.
Constructor Detail
new sap.gantt.misc.Format()
A dummy constructor for Format. Do not construct a Format object; instead, call static methods abapTimestampToDate, dateToAbapTimestamp, and abapTimestampToTimeLabel directly.
Method Detail
sap.gantt.misc.Format.abapTimestampToDate(sTimestamp): Date
Converts an ABAP timestamp(eg:"20150909000000" ) into a Date instance.
Parameters:
{string}sTimestamp The ABAP timestamp to convert
Returns:
{Date} The output date instance
sap.gantt.misc.Format.abapTimestampToTimeLabel(sTimestamp, oLocale): string
Converts an ABAP timestamp into a time label to be used in Gantt.
Parameters:
{string}sTimestamp The ABAP timestamp to convert
{sap.gantt.config.Locale}oLocale The locale object has the time zone and DST info; this determines how the function converts the timestamp into a locale-specific time label
Returns:
{string} The output time label
sap.gantt.misc.Format.dateToAbapTimestamp(oDate): string
Converts a Date instance into an ABAP timestamp.
Parameters:
{Date}oDate The date instance to convert
Returns:
{string} The output ABAP timestamp