factoriolib / flib

A set of high-quality, commonly-used utilities for creating Factorio mods.
https://mods.factorio.com/mod/flib
MIT License
61 stars 15 forks source link

Inconsistent minute output in ticks_to_timestring #26

Closed modo-lv closed 3 years ago

modo-lv commented 3 years ago

Trivially minor, but I noticed that during the first hour of gameplay, single-digit minutes are printed without 0 the prefix (unlike after that).

This should probably be "%02d:%02d": https://github.com/factoriolib/flib/blob/01f73fbda8764a6a9a385008c6e552ec7afdea89/misc.lua#L33

raiguard commented 3 years ago

This is intentional, but I will add an option to keep the leading zeroes.