b.g.o: Format date parts with leading digits

For compatibility with how versioneddir.js does it.