package com.pqs9300.util;

import com.njcn.utils.PubUtils;

import java.io.Serializable;
import java.util.Date;

public class TransformTime implements Serializable {
    private String startTime;
    private String endTime;
    private Date start;
    private Date end;

    public TransformTime(String startTime, String endTime) {
        this.startTime = startTime;
        this.endTime = endTime;
    }

    public void string2Date() throws Exception {
        startTime += " 00:00:00";
        endTime += " 23:59:59";

        start = PubUtils.string2Date(startTime, "yyyy-MM-dd HH:mm:ss");
        end = PubUtils.string2Date(endTime, "yyyy-MM-dd HH:mm:ss");
    }

    public Date getStart() {
        return start;
    }

    public Date getEnd() {
        return end;
    }
}
