zero-padding 1 digit to 2 digits
For example when creating a xs:date where the month is one or two digits
by Chris Wallace - corrected due to bug found by Michael Kay. Cuased by too-casuall conversion from the original function with n
by Chris Wallace - revised for XQuery 3.0