Кирилл Данилов (donz_ru) wrote,
Кирилл Данилов
donz_ru

Шикарный комментарий к java.util.Calendar.roll( int field, int amount )

NOTE: This default implementation on Calendar just repeatedly calls the version of roll() that rolls by one unit. This may not always do the right thing. For example, if the DAY_OF_MONTH field is 31, rolling through February will leave it set to 28. The GregorianCalendar version of this function takes care of this problem. Other subclasses should also provide overrides of this function that do the right thing.

Сначала хотел выделить жирным последнее предложение, потом понял, что читать надо полностью, ценно каждое слово.
Отожгли.

Tags: java, sun
Subscribe

  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments