I remember that there seemed to be some problem with Java's Date processing, but I forgot the details. Generally, the enterprise-level Time framework Joda-Time is used, for example:
As for the problem with Java's Date processing, it was the old java.util.Date. The API processing time of the new package java.time is also very convenient. The API refers to many excellent Time Frameworks, such as Joda-Time, so if you want to use it, you should use your own API, haha, after all, he is his biological son
Thanks for the invitation.
I remember that there seemed to be some problem with Java's Date processing, but I forgot the details. Generally, the enterprise-level Time framework Joda-Time is used, for example:
As for the problem with Java's Date processing, it was the old
java.util.Date
. The API processing time of the new packagejava.time
is also very convenient. The API refers to many excellent Time Frameworks, such asJoda-Time
, so if you want to use it, you should use your own API, haha, after all, he is his biological sonHaha, isn’t it very concise? Isn’t it more concise than the illegitimate child of
Joda-Time
? It’s so cool~~~QuackLocalDate.now().minusWeeks(1).minusDays(LocalDate.now().getDayOfWeek().getValue()-1)
This is how I write it now, I don’t know if there is a better way