All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dominokit.domino.ui.datepicker.DatePickerUtil Maven / Gradle / Ivy

There is a newer version: 1.0.139
Show newest version
package org.dominokit.domino.ui.datepicker;

import elemental2.core.JsDate;

public class DatePickerUtil {

    public static int getValidMonthDate(int year, int month, int date){
        int days = getMonthDays(year, month);

        if (date > days) {
            return 1;
        } else {
            return date;
        }
    }

    public static int getMonthDays(int year, int month){
        JsDate jsDateCalc = new JsDate(year, month, 32);
        return (32 - (jsDateCalc.getDate()));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy