package com.brilliance.isc.swift.objmtconvert.ext;

import com.brilliance.isc.swift.objmtconvert.util.DateUtil;
import lombok.Data;

import java.util.Date;

/**
 * @Description xml格式时间
 * @Author s_guodong
 * @Date 2023/4/24
 */
@Data
public class XmlDate {
    private String dateStr;

    public XmlDate() {
        dateStr = DateUtil.parseXMLGregorianCalendar(new Date()).toXMLFormat();
    }

    public XmlDate(Date date) {
        dateStr = DateUtil.parseXMLGregorianCalendar(date).toXMLFormat();
    }

    public XmlDate(String date) {
        dateStr = date;
    }
}
