private long toDays() {
        switch (type) {
            case SECONDS:
                return value / (3600 * 24);
            case MINUTES:
                return value / (60 * 24);
            case HOURS:
                return value / 24;
            case DAYS:
                return value;
            case MILLISECONDS:
            default:
                return value / (3600 * 1000 * 24);
        }
    }