import { Time } from "std-widgets.slint";

export global Utils  {
	pure function formatZeroPadding(number: int) -> string {
		if (number < 10) {
			return "0\{number}";
		}
		return number;
	}

	 public pure function timeToString(time: Time) -> string {
		return "\{formatZeroPadding(time.hour)}h\{formatZeroPadding(time.minute)}";
	}
}
