本文整理了Java中org.apache.jackrabbit.util.ISO8601.appendZeroPaddedInt()
方法的一些代码示例,展示了ISO8601.appendZeroPaddedInt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ISO8601.appendZeroPaddedInt()
方法的具体详情如下:
包路径:org.apache.jackrabbit.util.ISO8601
类名称:ISO8601
方法名:appendZeroPaddedInt
[英]Appends a zero-padded number to the given string buffer.
This is an internal helper method which doesn't perform any validation on the given arguments.
[中]在给定的字符串缓冲区中追加一个带零填充的数字。
这是一个内部助手方法,它不会对给定的参数执行任何验证。
代码示例来源:origin: org.apache.jackrabbit/jackrabbit-jcr-commons
appendZeroPaddedInt(buf, getYear(cal), 4);
buf.append('-');
appendZeroPaddedInt(buf, cal.get(Calendar.MONTH) + 1, 2);
buf.append('-');
appendZeroPaddedInt(buf, cal.get(Calendar.DAY_OF_MONTH), 2);
buf.append('T');
appendZeroPaddedInt(buf, cal.get(Calendar.HOUR_OF_DAY), 2);
buf.append(':');
appendZeroPaddedInt(buf, cal.get(Calendar.MINUTE), 2);
buf.append(':');
appendZeroPaddedInt(buf, cal.get(Calendar.SECOND), 2);
buf.append('.');
appendZeroPaddedInt(buf, cal.get(Calendar.MILLISECOND), 3);
int minutes = Math.abs((offset / (60 * 1000)) % 60);
buf.append(offset < 0 ? '-' : '+');
appendZeroPaddedInt(buf, hours, 2);
buf.append(':');
appendZeroPaddedInt(buf, minutes, 2);
} else {
buf.append('Z');
代码示例来源:origin: apache/jackrabbit
appendZeroPaddedInt(buf, getYear(cal), 4);
buf.append('-');
appendZeroPaddedInt(buf, cal.get(Calendar.MONTH) + 1, 2);
buf.append('-');
appendZeroPaddedInt(buf, cal.get(Calendar.DAY_OF_MONTH), 2);
buf.append('T');
appendZeroPaddedInt(buf, cal.get(Calendar.HOUR_OF_DAY), 2);
buf.append(':');
appendZeroPaddedInt(buf, cal.get(Calendar.MINUTE), 2);
buf.append(':');
appendZeroPaddedInt(buf, cal.get(Calendar.SECOND), 2);
buf.append('.');
appendZeroPaddedInt(buf, cal.get(Calendar.MILLISECOND), 3);
int minutes = Math.abs((offset / (60 * 1000)) % 60);
buf.append(offset < 0 ? '-' : '+');
appendZeroPaddedInt(buf, hours, 2);
buf.append(':');
appendZeroPaddedInt(buf, minutes, 2);
} else {
buf.append('Z');
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
appendZeroPaddedInt(buf, getYear(cal), 4);
buf.append('-');
appendZeroPaddedInt(buf, cal.get(Calendar.MONTH) + 1, 2);
buf.append('-');
appendZeroPaddedInt(buf, cal.get(Calendar.DAY_OF_MONTH), 2);
buf.append('T');
appendZeroPaddedInt(buf, cal.get(Calendar.HOUR_OF_DAY), 2);
buf.append(':');
appendZeroPaddedInt(buf, cal.get(Calendar.MINUTE), 2);
buf.append(':');
appendZeroPaddedInt(buf, cal.get(Calendar.SECOND), 2);
buf.append('.');
appendZeroPaddedInt(buf, cal.get(Calendar.MILLISECOND), 3);
int minutes = Math.abs((offset / (60 * 1000)) % 60);
buf.append(offset < 0 ? '-' : '+');
appendZeroPaddedInt(buf, hours, 2);
buf.append(':');
appendZeroPaddedInt(buf, minutes, 2);
} else {
buf.append('Z');
内容来源于网络,如有侵权,请联系作者删除!