private int millisecondToOtherFormat(long duration, String conversionSwitch) {
        switch (conversionSwitch) {
            case ("year"):
                return (int) (duration / 31556952000L);
            case ("month"):
                return (int) (duration / 2629746000L);
            case ("week"):
                return (int) (duration / 604800000);
            case ("day"):
                return (int) (duration / 86400000);
            case ("hour"):
                return (int) (duration / 3600000);
            case ("minute"):
                return (int) (duration / 60000);
            default:
                return (int) (duration / 1000); //returns in seconds
        }
    }