]> Lady’s Gitweb - Gitweb/commit
gitweb.js: Provide default values for padding in padLeftStr and padLeft
authorJakub Narebski <redacted>
Thu, 28 Apr 2011 19:04:03 +0000 (21:04 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:51:31 +0000 (00:51 -0400)
commit93870fd1862afe544366ddd5e206c57648c8595f143f68a1ad0701c82d01fb18
treee3307f926910d8758897652799b0806f96a62fa106e9611244c22bd2f44327c2
parent5c839d6f6a7cea631987a5c1c5df688a76af5addb960cb6688fedbd8a6f65ae3
gitweb.js: Provide default values for padding in padLeftStr and padLeft

This means that one can use padLeft(4, 2) and it would be equivalent
to runing padLeft(4, 2, '0'), and it would return '04' i.e. '4' padded
with '0' to width 2, to be used e.g. in formatting date and time.

This should make those functions easier to use.  Current code doesn't
yet make use of this feature.

Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
static/js/lib/common-lib.js
This page took 0.307859 seconds and 4 git commands to generate.