/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights reserved. <a>http://www.crunii.com</a>
 */
package com.crunii.micro.common.xml.jaxb;

import com.crunii.micro.common.utils.DateUtil;

import javax.xml.bind.annotation.adapters.XmlAdapter;
import java.util.Date;

/**
 * @author 田平 create 2020年2月14日下午4:44:57
 */
public class JaxbDateSerializer extends XmlAdapter<String, Date> {

	@Override
	public Date unmarshal(String v) {
		return DateUtil.parse(v);
	}

	@Override
	public String marshal(Date v) {
		return DateUtil.format(v);
	}

}
