当前位置:网站首页>Period to string [repeat] - period to string [duplicate]
Period to string [repeat] - period to string [duplicate]
2022-06-25 06:36:00 【javail】
problem :
This question already has an answer here: This question has been answered here :
I'm using the Joda-Time library with Java. I am using Java Of Joda-Time library .I'm having some difficulty trying to turn a Period object to a string in the format of "x days, x hours, x minutes". I'm trying to Period Object to “x days,x hours,x minutes” There are some difficulties in formatting strings .
These Period objects are first created by adding an amount of seconds to them (they are serialized to XML as seconds and then recreated from them). these Period Objects are first created by adding a certain number of seconds to them ( They are serialized in seconds as XML, Then recreate from them ).If I simply use the getHours() etc. methods in them, all I get is zero and the total amount of seconds with getSeconds. If I just use them getHours() Other methods , So all I get is a zero sum getSeconds Of total Number of seconds .
How can I make Joda calculate the seconds into the respective fields, like days, hours, etc...? How to make Joda Count the seconds in each field , Like heaven , Hours, etc ......?
Solution :
Reference resources : https://stackoom.com/en/question/62kn边栏推荐
- Talk about TCP and UDP
- Uncaught typeerror cannot set properties of undefined (setting 'classname') reported by binding onclick event in jsfor loop
- VMware virtual machine prompt: the virtual device ide1:0 cannot be connected because there is no corresponding device on the host.
- The "&" character will destroy the data stored in the web The "&" character breaks passwords that are stored in the web config
- Exercise: completion
- [Suanli network] technological innovation of Suanli Network -- Key Technologies of green and security
- Analysis report on global and Chinese pharmaceutical excipients industry competition and marketing model 2022-2028
- How to chain multiple different InputStreams into one InputStream
- BGP - basic concept
- Ht81293 built in adaptive dynamic boost 20W mono class D power amplifier IC solution
猜你喜欢

Notes on dashboard & kuboard installation in kubernetes cluster

With a younger brother OCR, say no to various types of verification codes!
![[hand torn STL] Stack & queue](/img/db/d05c52f8e3fb0aade51460e86cf623.jpg)
[hand torn STL] Stack & queue

Tencent and China Mobile continued to buy back with large sums of money, and the leading Hong Kong stocks "led" the market to rebound?

Vegetables sklearn - xgboost (2)

Introduction to sap ui5 tools

After unplugging the network cable, does the original TCP connection still exist?

アルマ / 炼金妹

DNS domain name system

Cs8126t 3.1w mono ultra low EMI unfiltered class D audio power amplifier IC
随机推荐
Global and Chinese benzoic acid market competition strategy and demand scale forecast report 2022
Introduction to sap ui5 tools
JS to determine whether an element exists in the array (four methods)
Pre knowledge of asynchronous operation
[data visualization application] draw spatial map (with R language code)
@The difference between notempty, @notnull and @notblank
DataX tutorial (10) - hot plug principle of dataX plug-in
Understand what MSS is
In depth inventory: 23 vscode plug-in artifacts that improve development efficiency and aesthetics
Vegetables sklearn - xgboost (2)
Cs8126t 3.1w mono ultra low EMI unfiltered class D audio power amplifier IC
Global and Chinese medical protective clothing market supply and demand research and investment value proposal report 2022-2028
Ht7180 3.7V L 12v/2a built in MOS high current boost IC solution
[no title] dream notes 2022-02-20
[Suanli network] problems and challenges faced by the development of Suanli network
Observation configuring wmic
Laravel8+ wechat applet generates QR code
Preliminary practice of niuke.com (summary)
JS dynamic table creation
sin(a-b)=sina*cosb-sinb*cosa的推导过程