Date converter and formatter

Allow script to reformat and edit timezone of timestamps.

timestamp.format(format: string, epochMilli: number)

Convert a date passed as milliseconds into a string representation using a given format in UTC timezone.

Arguments:
  • format – Destination format of the date. (default:dd/MM/yyyy HH:mm)

  • epochMilli – Time in [ms] sinch epoch.

Returns:

Return a string that represent a date human readable formated.

timestamp.format(format: string, epochMilli: number, timeZone: string)

Convert a date passed as milliseconds into a string representation using a given format and a given timezone.

Arguments:
  • format – Destination format of the date. (default:dd/MM/yyyy HH:mm)

  • epochMilli – Time in [ms] sinch epoch.

  • timeZone – Timezone of the destination date (default UTC)

Returns:

Return a string that represent a date human readable formated.

timestamp.format(epochMilli: number)

Convert a date passed as milliseconds into human readable string using default format and UTC timezone. (dd/MM/yyyy HH:mm)

Arguments:
  • epochMilli – Time in [ms] sinch epoch.

Returns:

Return a string that represent a date human readable formated.