永发信息网

Java求解,下面语句中的2$tB表示什么意思?

答案:2  悬赏:50  手机版
解决时间 2021-01-05 14:41
Java求解,下面语句中的2$tB表示什么意思?
最佳答案
首先是是日期转换符的应用,d转化为两位数字的日
依据参数索引将字符串格式化的操作方式,以‘%’开始,以‘$’结束,‘%’之后的2表示的是第二个参数。
全部回答
对日期类型
This conversion may be applied to long, Long, Calendar, and Date.
't'
'\u0074'
Prefix for date and time conversion characters.

'T'
'\u0054'
The upper-case variant of 't'.
The following date and time conversion character suffixes are defined
for the 't' and 'T' conversions. The types are similar to
but not completely identical to those defined by GNU date and
POSIX strftime(3c). Additional conversion types are provided to
access Java-specific functionality (e.g. 'L' for milliseconds
within the second).
The following conversion characters are used for formatting times:
'H'
'\u0048'
Hour of the day for the 24-hour clock, formatted as two digits with
a leading zero as necessary i.e. 00 - 23. 00
corresponds to midnight.
'I'
'\u0049'
Hour for the 12-hour clock, formatted as two digits with a leading
zero as necessary, i.e. 01 - 12. 01 corresponds to
one o'clock (either morning or afternoon).
'k'
'\u006b'
Hour of the day for the 24-hour clock, i.e. 0 - 23.
0 corresponds to midnight.
'l'
'\u006c'
Hour for the 12-hour clock, i.e. 1 - 12. 1
corresponds to one o'clock (either morning or afternoon).
'M'
'\u004d'
Minute within the hour formatted as two digits with a leading zero
as necessary, i.e. 00 - 59.
'S'
'\u0053'
Seconds within the minute, formatted as two digits with a leading
zero as necessary, i.e. 00 - 60 ("60" is a special
value required to support leap seconds).
'L'
'\u004c'
Millisecond within the second formatted as three digits with
leading zeros as necessary, i.e. 000 - 999.
'N'
'\u004e'
Nanosecond within the second, formatted as nine digits with leading
zeros as necessary, i.e. 000000000 - 999999999. The precision
of this value is limited by the resolution of the underlying operating
system or hardware.
'p'
'\u0070'
Locale-specific morning or afternoon marker
in lower case, e.g."am" or "pm". Use of the
conversion prefix 'T' forces this output to upper case. (Note
that 'p' produces lower-case output. This is different from
GNU date and POSIX strftime(3c) which produce
upper-case output.)
'z'
'\u007a'
RFC 822
style numeric time zone offset from GMT, e.g. -0800. This
value will be adjusted as necessary for Daylight Saving Time. For
long, Long, and Date the time zone used is
the default time zone for this
instance of the Java virtual machine.
'Z'
'\u005a'
A string representing the abbreviation for the time zone. This
value will be adjusted as necessary for Daylight Saving Time. For
long, Long, and Date the time zone used is
the default time zone for this
instance of the Java virtual machine. The Formatter's locale will
supersede the locale of the argument (if any).
's'
'\u0073'
Seconds since the beginning of the epoch starting at 1 January 1970
00:00:00 UTC, i.e. Long.MIN_VALUE/1000 to
Long.MAX_VALUE/1000.
'Q'
'\u004f'
Milliseconds since the beginning of the epoch starting at 1 January
1970 00:00:00 UTC, i.e. Long.MIN_VALUE to
Long.MAX_VALUE. The precision of this value is limited by
the resolution of the underlying operating system or hardware.
The following conversion characters are used for formatting dates:
'B'
'\u0042'
Locale-specific full month name, e.g. "January", "February".
'b'
'\u0062'
Locale-specific abbreviated month name,
e.g. "Jan", "Feb".
'h'
'\u0068'
Same as 'b'.
'A'
'\u0041'
Locale-specific full name of the day of the week,
e.g. "Sunday", "Monday"
'a'
'\u0061'
Locale-specific short name of the day of the week,
e.g. "Sun", "Mon"
'C'
'\u0043'
Four-digit year divided by 100, formatted as two digits
with leading zero as necessary, i.e. 00 - 99
'Y'
'\u0059' Year, formatted to at least
four digits with leading zeros as necessary, e.g. 0092 equals
92 CE for the Gregorian calendar.
'y'
'\u0079'
Last two digits of the year, formatted with leading zeros as
necessary, i.e. 00 - 99.
'j'
'\u006a'
Day of year, formatted as three digits with leading zeros as
necessary, e.g. 001 - 366 for the Gregorian calendar.
001 corresponds to the first day of the year.
'm'
'\u006d'
Month, formatted as two digits with leading zeros as necessary,
i.e. 01 - 13, where "01" is the first month of the
year and ("13" is a special value required to support lunar
calendars).
'd'
'\u0064'
Day of month, formatted as two digits with leading zeros as
necessary, i.e. 01 - 31, where "01" is the first day
of the month.
'e'
'\u0065'
Day of month, formatted as two digits, i.e. 1 - 31 where
"1" is the first day of the month.
The following conversion characters are used for formatting common
date/time compositions.
'R'
'\u0052'
Time formatted for the 24-hour clock as "%tH:%tM"
'T'
'\u0054'
Time formatted for the 24-hour clock as "%tH:%tM:%tS".
'r'
'\u0072'
Time formatted for the 12-hour clock as "%tI:%tM:%tS
%Tp". The location of the morning or afternoon marker
('%Tp') may be locale-dependent.
'D'
'\u0044'
Date formatted as "%tm/%td/%ty".
'F'
'\u0046'
ISO 8601
complete date formatted as "%tY-%tm-%td".
'c'
'\u0063'
Date and time formatted as "%ta %tb %td %tT %tZ %tY",
e.g. "Sun Jul 20 16:17:00 EDT 1969".
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
批判中国教育的短文谁有?
我是高邮人现在房子买在扬州那么小孩的户口怎
维他奶进口报关需要什么资料
我国应该从美国次贷危机中吸取哪些教训?
久久SEO蒋晖是骗人的吗
抗联为什么在东北混不下去被赶出东北,因为不
02年蝴蝶奔后尾灯有控制盒吗
汪涵谈与杨乐乐的夫妻相处之道,好男人是如何
判断正误 夏季一天中某时刻植物的净光合为零,
一般来说手机音质好呢还是mp3音质好
求年纪第一爱吃糖这本小说百度云
LOL英雄联盟gif动态图,撸友们知道哪个英雄吗
有谁造这是什么系列的图么。。。?
近视眼是将远处物体的像成在视网膜的________
为什么当R(a1,a2,a3)=3 ,向量组a1,a2,a3线性
推荐资讯
听说淄博有玫瑰谷,想去看看
包头市商业银行(市府东路支行)怎么去啊,我要
疯狂猜成语585关一个人女人头上写着三前面有
【求对】 上:重阳九九,草木萧萧,万众登高怀远
萌宠当佳地址在什么地方,想过去办事,
国服3.13奶德急速与暴击
今天不下心摔到膝盖,现在要怎么处理才行
恋爱数字241624什么意思
2x(x十14.9)=38的解方程小学
关于种树的诗词
法人股东和自然人股东 可以是一个人么
广东高考听力的part C部分怎么做才易拿高分?
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?