Java tutorial
//package com.java2s; public class Main { public static long m11351a(long j, int i, int i2) { return (((long) (i < 7 ? i * 31 : (i * 30) + 6)) + ((1029983 * ((long) Math.floor(((double) (j - 474)) / 2820.0d))) + (((365 * ((m11349a((double) (j - 474), 2820.0d) + 474) - 1)) + ((long) Math .floor(((double) ((682 * (m11349a((double) (j - 474), 2820.0d) + 474)) - 110)) / 2816.0d))) + 1948320))) + ((long) i2); } public static long m11349a(double d, double d2) { return (long) (d - (Math.floor(d / d2) * d2)); } }