author | Jakub Narebski <jnareb@gmail.com> | |
Thu, 28 Apr 2011 19:04:03 +0000 (21:04 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 24 May 2011 18:22:44 +0000 (11:22 -0700) | ||
commit | 4dfa207eec44e0d8869c4978cf3d9861aaf40091 | |
tree | dddd91572eab0cb9ea82fd5cb72a0619e8ac3714 | tree | snapshot |
parent | e2895de4d8efef52e835731aaaaa9467e2110e62 | commit | diff |
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 <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/static/js/lib/common-lib.js | diff | blob | history |