cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
361
Views
0
Helpful
2
Replies

IPCC easter day - how to compute the remainder of a division ?

Hi !

I want to check in my script the public holidays ... and the easter day.

I found the code on internet to calculate it but it use the remainder of a division -> % in java.

-> int a = year % 19;

When I tried to use % in the set step, it refused it ...

Do you have an idea ?

Thanks you in advance,

Thierry

2 Replies 2

jasyoung
Level 7
Level 7

There isn't a step to do so. You can do it by going through a couple intermediate integer steps.

You do the division, and then you multiply the result by the divisor and subtract that from your original number to get the remainder. I've attached a quick demo script.

Hi,

Thanks you for your example.

But I found a best solution : a custom java class.

I had problem to run it but after I found the solution :

1. compile the class with Java 1.3.0 or 1.3.1 only !

2. put it on the server and add the class in the classpath

and your class is available in cra !

Thierry