I want to judge the range using the monthly degree


I want to get it before September when I have monthly data, Since January, February, and March are the data for the next year, you may not want to include them. At that time, make a note of an example of how to remove it easily.

How to do

Convert each month to be compared as follows, It can be solved by judging using the converted value.

(Monthly+ 8) % 12

For example, when retrieving data before September By setting the monthly conversion value of the acquisition source data <= the reference monthly conversion value, Only April, June, July, August and September will be available. This is because the converted value will be as follows. Since the converted value for September is "5", you can get April to September, which is less than that value.

Monthly Converted value
1 9
2 10
3 11
4 0
5 1
6 2
7 3
8 4
9 5
10 6
11 7
12 8

Recommended Posts

I want to judge the range using the monthly degree
I want to call the main method using reflection
I want to limit the input by narrowing the range of numbers
I want to var_dump the contents of the intent
I want to truncate after the decimal point
I want to get the value in Ruby
I want to create the strongest local development environment using VSCode Remote Containers
I want to know the answer of the rock-paper-scissors app
I want to display the name of the poster of the comment
I want to dark mode with the SWT app
[Rough commentary] I want to marry the pluck method
I want to return the scroll position of UITableView!
I want to simplify the log output on Android
I want to add a delete function to the comment function
I want to call a method and count the number
I want to use the Java 8 DateTime API slowly (now)
I want to create a form to select the [Rails] category
I want to use the sanitize method other than View.
I tried to build the environment little by little using docker
I want to put the JDK on my Mac PC
I want to give a class name to the select attribute
I want to recursively search the class list under the package
I want to transition to the same screen in the saved state
I want to return multiple return values for the input argument
[Ruby] I want to reverse the order of the hash table
I want to pass the startup command to postgres with docker-compose.
I want to simplify the conditional if-else statement in Java
I tried to explain the method
[Eclipse] I want to open the same file twice [Split editor]
The story I wanted to unzip
I want to add the disabled option to f.radio_button depending on the condition
I want to remove the top margin in Grouped UITableView (swift)
I want to control the default error message of Spring Boot
I tried to display the calendar on the Eclipse console using Java.
I want to change the value of Attribute in Selenium of Ruby
[Android] I want to get the listener from the button in ListView
I want to download a file on the Internet using Ruby and save it locally (with caution)
[Ruby] I want to extract only the value of the hash and only the key
[Note] I want to get in reverse order using afterLast with JdbcTemplate
I want to pass the argument of Annotation and the argument of the calling method to aspect
I want to get the IP address when connecting to Wi-Fi in Java
I want to display an error message when registering in the database
I want to get the field name of the [Java] field. (Old tale tone)
I want to introduce the committee with Rails without getting too dirty
I want you to use Enum # name () for the Key of SharedPreference
I want to write a unit test!
I wanted to add @VisibleForTesting to the method
I was addicted to the roll method
I tried to implement the Iterator pattern
I was addicted to the Spring-Batch test
I tried to summarize the Stream API
I want to stop Java updates altogether
I want to use @Autowired in Servlet
I went to the Java Women's Club # 1
I want to target static fields to @Autowired
I want to do team development remotely
Development memo ~ I want to display only the first image posted multiple times ~
If you are using Android Room and want to change the column definition
I want you to use Scala as Better Java for the time being
[Eclipse] I want to use the completion function, but I want to manage to confirm the completion with spaces.
I want to see the contents of Request without saying four or five