package com.ibeetl.admin.flow.utils;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class DateUtils {
	public static String getDateFromFormat(String format) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(new Date());
        return getDateFromFormat(format,calendar);
    }

    public static String getDateFromFormat(String format, Calendar calendar) {
        Date time = calendar.getTime();
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        return sdf.format(time);
    }
}
