SPL File DateTimeFormattingFunctions.spl

Content

Functions
  • formatElapsedTime(float64): This function formats a value representing elapsed time, in seconds including a fractional part, as a string representation of that time in the form 'DDDDd HHh MMm SS.FFFFFFs', with leading zeros omitted.
  • formatElapsedTime(float64, uint32): This function formats a value representing elapsed time, in seconds including a fractional part, as a string representation of that time in the form 'DDDDd HHh MMm SS.FFFFFFs', with leading zeros omitted.
  • formatElapsedTime(uint32): This function formats an integer representing elapsed time, in seconds, as a string representation of that time in the form 'DDDDd HHh MMm SSs', with leading zeros omitted.
  • formatEpoch(uint32, rstring): This function formats an integer representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string, according to an 'strftime' format pattern.
  • formatEpochDateTime(float64): This function formats the integer and fractional parts of a value representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'YYYY-MM-DD HH:MM:SS.FFFFFF' in the local time zone.
  • formatEpochDateTime(float64, uint32): This function formats the integer and fractional parts of a value representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'YYYY-MM-DD HH:MM:SS.FFFFFF' in the local time zone.
  • formatEpochDateTime(timestamp): This function formats the integer and fractional parts of a timestamp representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'YYYY-MM-DD HH:MM:SS.FFFFFF' in the local time zone.
  • formatEpochDateTime(timestamp, uint32): This function formats the integer and fractional parts of a timestamp representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'YYYY-MM-DD HH:MM:SS.FFFFFF' in the local time zone.
  • formatEpochDateTime(uint32): This function formats an integer representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'YYYY-MM-DD HH:MM:SS' in the local time zone.
  • formatEpochTime(float64): This function formats the integer and fractional parts of a value representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'HH:MM:SS.FFFFFF' in the local time zone.
  • formatEpochTime(float64, uint32): This function formats the integer and fractional parts of a value representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'HH:MM:SS.FFFFFF' in the local time zone.
  • formatEpochTime(timestamp): This function formats the integer and fractional parts of a timestamp representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'HH:MM:SS.FFFFFF' in the local time zone.
  • formatEpochTime(timestamp, uint32): This function formats the integer and fractional parts of a timestamp representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'HH:MM:SS.FFFFFF' in the local time zone.
  • formatEpochTime(uint32): This function formats an integer representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'HH:MM:SS' in the local time zone.
  • formatSubseconds(float64, uint32): This function formats the integer and fractional parts of a value representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string, with the specified precision for the fractional part.
  • formatSubseconds(timestamp, uint32): This function formats the integer and fractional parts of a timestamp representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string, with the specified precision for the fractional part.

Functions

rstring formatEpoch(uint32 seconds, rstring format)

This function formats an integer representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string, according to an 'strftime' format pattern. It is used in the formatEpochDateTime() and formatEpochTime() functions, and can also be used directly with other patterns.

The format argument requires an 'strftime' formatting string.

Parameters

  • seconds: an integer number of seconds, relative to the beginning of the 'Unix' epoch
  • format: an 'strftime' formatting string

Returns

  • a string containing the 'seconds' argument value, formatted according to the 'format' argument

rstring formatSubseconds(float64 seconds, uint32 precision)

This function formats the integer and fractional parts of a value representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string, with the specified precision for the fractional part. It is used in the formatEpochDateTime() and formatEpochTime() functions below, and can also be used directly with other precisions.

Parameters

  • seconds: a number of seconds, including a fractional part, relative to the beginning of the 'Unix' epoch
  • precision: the number of digits to format for the fractional part of the 'seconds' argment

Returns

  • a string containing the 'seconds' argument value, with the fractional part expressed as 'precision' digits

rstring formatSubseconds(timestamp seconds, uint32 precision)

This function formats the integer and fractional parts of a timestamp representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string, with the specified precision for the fractional part. It is used in the formatEpochDateTime() and formatEpochTime() functions below, and can also be used directly with other patterns and precisions.

Parameters

  • seconds: a number of seconds, including a fractional part, relative to the beginning of the 'Unix' epoch
  • precision: the number of digits to format for the fractional part of the 'seconds' argment

Returns

  • a string containing the 'seconds' argument value, with the fractional part expressed as 'precision' digits

rstring formatEpochDateTime(uint32 seconds)

This function formats an integer representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'YYYY-MM-DD HH:MM:SS' in the local time zone.

Parameters

  • seconds: an integer number of seconds, relative to the beginning of the 'Unix' epoch

Returns

  • a string containing the 'seconds' argument value, formatted as 'YYYY-MM-DD HH:MM:SS' in the local time zone

rstring formatEpochTime(uint32 seconds)

This function formats an integer representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'HH:MM:SS' in the local time zone.

Parameters

  • seconds: an integer number of seconds, relative to the beginning of the 'Unix' epoch

Returns

  • a string containing the 'seconds' argument value, formatted as 'HH:MM:SS' in the local time zone

rstring formatEpochDateTime(float64 seconds, uint32 precision)

This function formats the integer and fractional parts of a value representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'YYYY-MM-DD HH:MM:SS.FFFFFF' in the local time zone.

Parameters

  • seconds: a number of seconds, including a fractional part, relative to the beginning of the 'Unix' epoch
  • precision: the number of digits to format for the fractional part of the 'seconds' argment (defaults to '6' if not specified)

Returns

  • a string containing the 'seconds' argument value, formatted as 'YYYY-MM-DD HH:MM:SS.FFFFFF' in the local time zone

rstring formatEpochTime(float64 seconds, uint32 precision)

This function formats the integer and fractional parts of a value representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'HH:MM:SS.FFFFFF' in the local time zone.

Parameters

  • seconds: a number of seconds, including a fractional part, relative to the beginning of the 'Unix' epoch
  • precision: the number of digits to format for the fractional part of the 'seconds' argment (defaults to '6' if not specified)

Returns

  • a string containing the 'seconds' argument value, formatted as 'HH:MM:SS.FFFFFF' in the local time zone

rstring formatEpochDateTime(float64 seconds)

This function formats the integer and fractional parts of a value representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'YYYY-MM-DD HH:MM:SS.FFFFFF' in the local time zone.

Parameters

  • seconds: a number of seconds, including a fractional part, relative to the beginning of the 'Unix' epoch

Returns

  • a string containing the 'seconds' argument value, formatted as 'YYYY-MM-DD HH:MM:SS.FFFFFF' in the local time zone

rstring formatEpochTime(float64 seconds)

This function formats the integer and fractional parts of a value representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'HH:MM:SS.FFFFFF' in the local time zone.

Parameters

  • seconds: a number of seconds, including a fractional part, relative to the beginning of the 'Unix' epoch

Returns

  • a string containing the 'seconds' argument value, formatted as 'HH:MM:SS.FFFFFF' in the local time zone

rstring formatEpochDateTime(timestamp seconds, uint32 precision)

This function formats the integer and fractional parts of a timestamp representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'YYYY-MM-DD HH:MM:SS.FFFFFF' in the local time zone.

Parameters

  • seconds: a number of seconds, including a fractional part, relative to the beginning of the 'Unix' epoch
  • precision: the number of digits to format for the fractional part of the 'seconds' argment (defaults to '6' if not specified)

Returns

  • a string containing the 'seconds' argument value, formatted as 'YYYY-MM-DD HH:MM:SS.FFFFFF' in the local time zone

rstring formatEpochTime(timestamp seconds, uint32 precision)

This function formats the integer and fractional parts of a timestamp representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'HH:MM:SS.FFFFFF' in the local time zone.

Parameters

  • seconds: a number of seconds, including a fractional part, relative to the beginning of the 'Unix' epoch
  • precision: the number of digits to format for the fractional part of the 'seconds' argment (defaults to '6' if not specified)

Returns

  • a string containing the 'seconds' argument value, formatted as 'HH:MM:SS.FFFFFF' in the local time zone

rstring formatEpochDateTime(timestamp seconds)

This function formats the integer and fractional parts of a timestamp representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'YYYY-MM-DD HH:MM:SS.FFFFFF' in the local time zone.

Parameters

  • seconds: a number of seconds, including a fractional part, relative to the beginning of the 'Unix' epoch

Returns

  • a string containing the 'seconds' argument value, formatted as 'YYYY-MM-DD HH:MM:SS.FFFFFF' in the local time zone

rstring formatEpochTime(timestamp seconds)

This function formats the integer and fractional parts of a timestamp representing 'Unix epoch' time (that is, seconds since January 1st, 1970 at midnight in Greenwich, England) as a string in the form 'HH:MM:SS.FFFFFF' in the local time zone.

Parameters

  • seconds: a number of seconds, including a fractional part, relative to the beginning of the 'Unix' epoch

Returns

  • a string containing the 'seconds' argument value, formatted as 'HH:MM:SS.FFFFFF' in the local time zone

rstring formatElapsedTime(uint32 seconds)

This function formats an integer representing elapsed time, in seconds, as a string representation of that time in the form 'DDDDd HHh MMm SSs', with leading zeros omitted.

Parameters

  • seconds: a number of seconds of elapsed time

Returns

  • a string representation of the 'seconds' argument of the form 'DDDDd HHh MMm SSs', with leading zeros omitted

rstring formatElapsedTime(float64 seconds, uint32 precision)

This function formats a value representing elapsed time, in seconds including a fractional part, as a string representation of that time in the form 'DDDDd HHh MMm SS.FFFFFFs', with leading zeros omitted.

Parameters

  • seconds: a number of seconds of elapsed time
  • precision: the number of digits to format for the fractional part of the 'seconds' argment (defaults to '6' if not specified)

Returns

  • a string representation of the 'seconds' argument of the form 'DDDDd HHh MMm SS.FFFFFFs', with leading zeros omitted

rstring formatElapsedTime(float64 seconds)

This function formats a value representing elapsed time, in seconds including a fractional part, as a string representation of that time in the form 'DDDDd HHh MMm SS.FFFFFFs', with leading zeros omitted.

Parameters

  • seconds: a number of seconds of elapsed time

Returns

  • a string representation of the 'seconds' argument of the form 'DDDDd HHh MMm SS.FFFFFFs', with leading zeros omitted