Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8285775

How about support LocalDate.tomorrow() and LocalDate.yesterday()

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      I think a lot of people write the following code to get tomorrow and yesterday.

      ```
      LocalDate tomorrow = LocalDate.now().plusDays(1);
      LocalDate yesterday = LocalDate.now().minusDays(1);
      ```

      I think supporting tomorrow() and yesterday() functions will make it more convenient, meaningful, and more readable.

      For example we can get 'tomorrow', 'yesterday' like following code.

      ```
      LocalDate tomorrow = LocalDate.tomorrow(); // or LocalDate.tomorrow(zone); or LocalDate.tomorrow(clock);
      LocalDate yesterday = LocalDate.yesterday(); // or LocalDate.yesterday(zone); or LocalDate.yesterday(clock);
      ```

      Please review about this report.


            naoto Naoto Sato
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: