processTimestampToDate function

String processTimestampToDate(
  1. dynamic timestampMixed,
  2. bool fullDatetime,
  3. String separator
)

Implementation

String processTimestampToDate(
  dynamic timestampMixed,
  bool fullDatetime,
  String separator,
) {
  if (tsUtDebug) {
    logDebug(
      'processTimestampToDate | timestampMixed: $timestampMixed, fullDatetime: $fullDatetime, separator: $separator',
    );
  }
  if (timestampMixed is int || timestampMixed is double) {
    if (timestampMixed == 0) {
      timestampMixed = nowToTimestap();
    }
    timestampMixed = timestampMixed.toString();
  } else if (timestampMixed is String) {
    timestampMixed = fixDateWithTz(timestampMixed);
    timestampMixed = dateToTimestap(timestampMixed);
  }
  return timestampToDate(
    timestamp: timestampMixed,
    fullDateTime: fullDatetime,
    separator: separator,
  );
}