package com.yiboshi.science.utils;

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

public class DateUtils {
    public static Date getTime(){
        return Calendar.getInstance().getTime();
    }
    public static int getYear(){
        return Calendar.getInstance().get(Calendar.YEAR);
    }

    public static String FormatDate(Date date) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(date);
    }
}
