filmov
tv
Wrong format date : YYYY vs yyyy #coding #programming #java #shorts #python #datastructures #short

Показать описание
When formatting dates in Java’s SimpleDateFormat class there is a difference between YYYY and yyyy. They both represent a year but yyyy specifies the calendar year while YYYY specifies the year (of “Week of Year”), used in the ISO year-week calendar.
In most cases, yyyy and YYYY yield the same number, it will not be a problem in ordinary times. That’s a subtle difference that only causes problems around a year change so your code could have been running perfectly fine all year only to cause a problem when the new year comes.
In most cases, yyyy and YYYY yield the same number, it will not be a problem in ordinary times. That’s a subtle difference that only causes problems around a year change so your code could have been running perfectly fine all year only to cause a problem when the new year comes.