Convenience method YearMonth.PlusMonths(x)?
See original GitHub issueIn version 3, if I want to find the YearMonth
in two months’ time, I know I can do
new YearMonth(2020, 05).OnDayOfMonth(1).PlusMonths(2).ToYearMonth()
but that seems rather long-winded. Does a convenience method like
new YearMonth(2020, 05).PlusMonths(2)
exist anywhere in Noda Time?
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
YearMonth plusMonths() method in Java with Examples
The plusMonths() method of YearMonth class in Java is used to get a copy of this YearMonth with the specified number of months...
Read more >java.time.YearMonth.plusMonths java code examples
Returns a {@link java.time.YearMonth} that is {@code months} months after this year/month. * * @param self a YearMonth * @param months the number...
Read more >Algorithm to create X number of dates - java
Currently my idea is to create a method to pick the latest date, parse the String to separate month and year, increase the...
Read more >java.time.YearMonth.plusMonths() Method Example
Description. The java.time.YearMonth.plusMonths(long months) method returns a copy of this YearMonth with the specified months added.
Read more >Struct LocalDate | Noda Time
Month. Gets the month of this local date within the year. Since 1.0.x ... Remarks. This is a convenience method for calling AtStartOfDay(LocalDate)....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No, this doesn’t exist yet, but sounds reasonable. I don’t expect to get to it before 3.0 though - you can always write your own extension method for now.
This was fixed by #1550.