question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Convenience method YearMonth.PlusMonths(x)?

See original GitHub issue

In 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:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jskeetcommented, May 19, 2020

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.

0reactions
jskeetcommented, Aug 23, 2020

This was fixed by #1550.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found